mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #20452: add more info in case of test_asyncio failure to try to debug the
failure on buildbot "x86 Ubuntu Shared 3.x"
This commit is contained in:
parent
a849be9c64
commit
0278032110
2 changed files with 19 additions and 2 deletions
|
@ -620,10 +620,18 @@ class BaseEventLoop(events.AbstractEventLoop):
|
|||
timeout = min(timeout, deadline)
|
||||
|
||||
# TODO: Instrumentation only in debug mode?
|
||||
if logger.isEnabledFor(logging.INFO):
|
||||
# FIXME: don't force log (issue #20452)
|
||||
if True: #logger.isEnabledFor(logging.INFO):
|
||||
t0 = self.time()
|
||||
event_list = self._selector.select(timeout)
|
||||
t1 = self.time()
|
||||
# FIXME: remove these debug info (issue #20452)
|
||||
dt = t1-t0
|
||||
if dt < timeout and not event_list:
|
||||
print("WARNING: selector.select(timeout=%.20f) took dt=%.20f sec (dt-timeout=%+.20f)"
|
||||
% (timeout, dt, dt-timeout), file=sys.__stdout__)
|
||||
print("WARNING: dt+%.20f > timeout? %s"
|
||||
% (self._granularity, (dt + self._granularity) > timeout), file=sys.__stdout__)
|
||||
if t1-t0 >= 1:
|
||||
level = logging.INFO
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue