lsst.dax.apdb
19.0.0-3-gbea416a+1
|
Public Member Functions | |
def | __init__ (self, name="", doPrint=True) |
def | start (self) |
def | stop (self) |
def | dump (self) |
def | __str__ (self) |
def | __enter__ (self) |
def | __exit__ (self, exc_type, exc_val, exc_tb) |
Instance of this class can be used to track consumed time. This class is also a context manager and can be used in a `with` statement. By default it prints consumed CPU time and real time spent in a context. Example: with Timer('SelectTimer'): engine.execute('SELECT ...')
def lsst.dax.apdb.timer.Timer.__init__ | ( | self, | |
name = "" , |
|||
doPrint = True |
|||
) |
@param name: Time name, will be printed together with statistics @param doPrint: if True then print statistics on exist from context
def lsst.dax.apdb.timer.Timer.__enter__ | ( | self | ) |
Enter context, start timer
def lsst.dax.apdb.timer.Timer.__exit__ | ( | self, | |
exc_type, | |||
exc_val, | |||
exc_tb | |||
) |
Exit context, stop and dump timer
def lsst.dax.apdb.timer.Timer.dump | ( | self | ) |
Dump timer statistics
def lsst.dax.apdb.timer.Timer.start | ( | self | ) |
Start timer.
def lsst.dax.apdb.timer.Timer.stop | ( | self | ) |
Stop timer.