LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
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"] |