diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-06-22 22:31:08 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-06-22 22:31:08 (GMT) |
commit | 1580fe3fcebcfe0b657281a6a556975c072a5530 (patch) | |
tree | f993f228b342073dc72dccdbf6f60285fd0579a1 /Lib/asyncio | |
parent | c082ee692bc92232031b050d4c6aa2510c6ef55e (diff) | |
download | cpython-1580fe3fcebcfe0b657281a6a556975c072a5530.zip cpython-1580fe3fcebcfe0b657281a6a556975c072a5530.tar.gz cpython-1580fe3fcebcfe0b657281a6a556975c072a5530.tar.bz2 |
asyncio, Tulip issue 172: only log selector timing in debug mode
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/base_events.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 0975bcb..2f7f197 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -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 |