lsst.pipe.base
13.0-12-gaf0c0ec+8
|
Functions | |
def | logPairs (obj, pairs, logLevel=Log.DEBUG) |
Log (name, value) pairs to obj.metadata and obj.log. More... | |
def | logInfo (obj, prefix, logLevel=Log.DEBUG) |
Log timer information to obj.metadata and obj.log. More... | |
def | timeMethod (func) |
Decorator to measure duration of a task method. More... | |
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.log level, constant such as lsst.log.Log.DEBUG) |
Logged items include:
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.log level constant, such as lsst.log.Log.DEBUG) |
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 |