mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
asyncio, Tulip issue 172: only log selector timing in debug mode
This commit is contained in:
parent
c082ee692b
commit
1580fe3fce
2 changed files with 4 additions and 2 deletions
|
@ -834,8 +834,7 @@ class BaseEventLoop(events.AbstractEventLoop):
|
|||
when = self._scheduled[0]._when
|
||||
timeout = max(0, when - self.time())
|
||||
|
||||
# TODO: Instrumentation only in debug mode?
|
||||
if logger.isEnabledFor(logging.INFO):
|
||||
if self._debug:
|
||||
t0 = self.time()
|
||||
event_list = self._selector.select(timeout)
|
||||
dt = self.time() - t0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue