lsst.dax.apdb  22.0.1-4-g2c3f5ac+98d2fe5ef5
Public Member Functions | List of all members
lsst.dax.apdb.apdbSql.Timer Class Reference

Public Member Functions

def __init__ (self, str name, bool do_logging=True, bool log_before_cursor_execute=False)
 
Timer __enter__ (self)
 
Any __exit__ (self, Optional[Type] exc_type, Any exc_val, Any 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__()

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

◆ __exit__()

Any lsst.dax.apdb.apdbSql.Timer.__exit__ (   self,
Optional[Type]  exc_type,
Any  exc_val,
Any  exc_tb 
)
Exit context, stop and dump timer

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