lsst.dax.apdb  21.0.0-2-g5242d73+d23602fb49
Public Member Functions | List of all members
lsst.dax.apdb.apdb.Timer Class Reference
Inheritance diagram for lsst.dax.apdb.apdb.Timer:

Public Member Functions

def __init__ (self, name, do_logging=True, log_before_cursor_execute=False)
 
def __enter__ (self)
 
def __exit__ (self, exc_type, exc_val, exc_tb)
 

Detailed Description

Timer class defining context manager which tracks execution timing.

Typical use:

    with Timer("timer_name"):
        do_something

On exit from block it will print elapsed time.

See also :py:mod:`timer` module.

Member Function Documentation

◆ __enter__()

def lsst.dax.apdb.apdb.Timer.__enter__ (   self)
Enter context, start timer

◆ __exit__()

def lsst.dax.apdb.apdb.Timer.__exit__ (   self,
  exc_type,
  exc_val,
  exc_tb 
)
Exit context, stop and dump timer

The documentation for this class was generated from the following file: