Module ImportFrom alias ImportFrom alias Import alias Import alias FunctionDef arguments args NameParam NameParam NameParam defaults Num AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TryFinally body Expr Yield finalbody Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd NameLoad TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list NameLoad Return NameLoad decorator_list
N/A __future__ absolute_import contextlib contextmanager N/A logging N/A time make_timing_logger N/A N/A logger precision level N/A 3 N/A logging DEBUG N/A N/A  Return a timing logger.

    Usage::

        >>> logger = logging.getLogger('foobar')
        >>> log_time = make_timing_logger(
        ...     logger, level=logging.INFO, precision=2)
        >>>
        >>> with log_time("hello %s", "world"):
        ...     time.sleep(1)
        INFO:foobar:hello world in 1.00s
     log_time N/A N/A msg N/A args N/A N/A  Log `msg` and `*args` with (naive wallclock) timing information
        when the context block exits.
         N/A start_time N/A N/A time time N/A N/A N/A N/A N/A N/A message N/A N/A {} in %0.{}fs format msg precision N/A duration N/A N/A N/A time time start_time N/A args N/A args N/A duration N/A N/A N/A logger log level message args N/A contextmanager N/A log_time N/A