GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — gh-88494: Reduce CLOCK_RES to 1 ms in tests by vstinner · Pull Request #118395 · python/cpython Conversation
|
|
Sadly, my change is too optimistic :-( test_asyncio failed on Windows:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Now I worry that other tests (that still use the 1ms value) will become flaky on Windows, unless you have a clear explanation why that fix is only needed in that one spot.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @vstinner for commit eb4e7d3 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
asyncio.BaseEventLoop.time() is time.monotonic(). On Windows, this clock now has a resolution of 100 ns, since I modified it to use QueryPerformanceCounter().
This test calls RegisterWaitForSingleObject() which has a resolution of 15.6 ms. I scheduled buildbot jobs to see how the change goes on more various machines. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Failure on AMD64 Windows Server 2022 NoGIL PR: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Maybe the problem is that the meaning of the variable CLOCK_RES is ambiguous? It looks like it gives the actual clock resolution, but it actually seems to mean the tolerance for longer (or shorter) delays. Tests depending on close-to-exact delays will always be flaky -- or if we make the tolerance too large, they will be meaningless. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
While it's appealing to make the test stricter, CLOCK_RES is used to compare time.monotonic() values (resolution better than 1 us), but also to compare Windows "wait" functions (resolution of 15.6 ms). I prefer to abandon this PR. I don't want to have multiple CLOCK_RES depending on the function and/or the operating system. Let's keep the status quo of 50-100 ms tolerance. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Good call. Sorry it didn't work out, but they can't all be winners... :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.