TimingMetricTask#
- class lsst.verify.tasks.TimingMetricTask(**kwargs)#
Bases:
MetadataMetricTaskA Task that computes a wall-clock time using metadata produced by the
lsst.utils.timer.timeMethoddecorator.Parameters#
args kwargs
Constructor parameters are the same as for
lsst.verify.tasks.MetricTask.Methods Summary
getInputMetadataKeys(config)Get search strings for the metadata.
makeMeasurement(timings)Compute a wall-clock measurement from metadata provided by
lsst.utils.timer.timeMethod.Methods Documentation
- classmethod getInputMetadataKeys(config)#
Get search strings for the metadata.
Parameters#
- config
cls.ConfigClass Configuration for this task.
Returns#
- keys
dict A dictionary of keys, optionally prefixed by one or more tasks in the format of
lsst.pipe.base.Task.getFullMetadata()."StartTimestamp"The key for an ISO 8601-compliant text string where the target method started (
str)."EndTimestamp"The key for an ISO 8601-compliant text string where the target method ended (
str).
- config
- makeMeasurement(timings)#
Compute a wall-clock measurement from metadata provided by
lsst.utils.timer.timeMethod.Parameters#
- timings
dict[str, any] A representation of the metadata passed to
run. Thedicthas the following keys:"StartTimestamp"The time the target method started, in an ISO 8601-compliant format (
strorNone)."EndTimestamp"The time the target method ended, in an ISO 8601-compliant format (
strorNone).
Returns#
- measurement
lsst.verify.Measurement The running time of the target method.
Raises#
- lsst.verify.tasks.MetricComputationError
Raised if the timing metadata are invalid.
- lsst.pipe.base.NoWorkFound
Raised if no matching timing metadata found.
- timings