LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
Functions | |
def | logPairs |
Log (name, value) pairs to obj.metadata and obj.log. More... | |
def | logInfo |
Log timer information to obj.metadata and obj.log. More... | |
def | timeMethod |
Decorator to measure duration of a task method. More... | |
Variables | |
list | __all__ = ["logInfo", "timeMethod"] |
def lsst.pipe.base.timer.logInfo | ( | obj, | |
prefix, | |||
logLevel = Log.DEBUG |
|||
) |
Log timer information to obj.metadata and obj.log.
obj | a Task, or any other object with these two attributes:
|
prefix | name prefix, the resulting entries are <prefix>CpuTime, etc. For example timeMethod uses prefix = <methodName>Start when the method begins and prefix = <methodName>End when the method ends. |
logLevel | log level (an lsst.pex.logging.Log level, constant such as lsst.pex.logging.Log.DEBUG) |
Logged items include:
Definition at line 53 of file timer.py.
def lsst.pipe.base.timer.logPairs | ( | obj, | |
pairs, | |||
logLevel = Log.DEBUG |
|||
) |
Log (name, value) pairs to obj.metadata and obj.log.
obj | a Task, or any other object with these two attributes:
|
pairs | a collection of (name, value) pairs |
logLevel | log level (an lsst.pex.logging.Log level constant, such as lsst.pex.logging.Log.DEBUG) |
Definition at line 34 of file timer.py.
def lsst.pipe.base.timer.timeMethod | ( | func | ) |
Decorator to measure duration of a task method.
Writes various measures of time and possibly memory usage to the task's metadata; all items are prefixed with the function name.
To use:
func | the method to wrap |
Definition at line 91 of file timer.py.
list lsst.pipe.base.timer.__all__ = ["logInfo", "timeMethod"] |