diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-02-10 10:47:50 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-02-10 10:47:50 (GMT) |
commit | 1c143b19c88021e323d4a88315efc8879b1c631d (patch) | |
tree | d1e4160e098623b6a757353fcad2d094b05d952b /Lib/asyncio | |
parent | 69a2547cd582370bcdc1754d10369cb6c7d6fcba (diff) | |
download | cpython-1c143b19c88021e323d4a88315efc8879b1c631d.zip cpython-1c143b19c88021e323d4a88315efc8879b1c631d.tar.gz cpython-1c143b19c88021e323d4a88315efc8879b1c631d.tar.bz2 |
Issue #20505: Add debug info to analyze sporaric failures of
test_timeout_rounding() on Windows XP buildbots.
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/base_events.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 558406c..4207a7e 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -633,7 +633,13 @@ class BaseEventLoop(events.AbstractEventLoop): else: logger.log(level, 'poll took %.3f seconds', t1-t0) else: + t0 = self.time() event_list = self._selector.select(timeout) + dt = self.time() - t0 + if not event_list and timeout and dt < timeout: + print("asyncio: selector.select(%.3f ms) took %.3f ms" + % (timeout*1e3, dt*1e3), + file=sys.__stderr__, flush=True) self._process_events(event_list) # Handle 'later' callbacks that are ready. |