sumerc / yappi

Yet Another Python Profiler, but this time multithreading, asyncio and gevent aware.
MIT License
1.45k stars 73 forks source link

Failing 2 CI tests on Windows - Py3.7 and Py3.8 #31

Closed sumerc closed 4 years ago

sumerc commented 4 years ago
======================================================================
FAIL: test_async_wall (test_asyncio_context_vars.AsyncUsage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests\test_asyncio_context_vars.py", line 50, in test_async_wall
    self.assertGreaterEqual(ttot, self.duration)
AssertionError: 0.059142719999999996 not greater than or equal to 0.1
======================================================================
FAIL: test_async_wall (test_asyncio_context_vars.AsyncUsageWithContextvars)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests\test_asyncio_context_vars.py", line 50, in test_async_wall
    self.assertGreaterEqual(ttot, self.duration)
AssertionError: 0.090103 not greater than or equal to 0.1
----------------------------------------------------------------------
Ran 77 tests in 17.157s
FAILED (failures=2, skipped=2)
Command exited with code 1
sumerc commented 4 years ago

This was due to a problem in clock precision in WIndows. Do NOT use Sleep(x) values smaller than 0.1. Otherwise on some cases clock is skewed and results become inconsistent.