TimingMetricTask#

class lsst.verify.tasks.TimingMetricTask(**kwargs)#

Bases: MetadataMetricTask

A Task that computes a wall-clock time using metadata produced by the lsst.utils.timer.timeMethod decorator.

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#

configcls.ConfigClass

Configuration for this task.

Returns#

keysdict

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).

makeMeasurement(timings)#

Compute a wall-clock measurement from metadata provided by lsst.utils.timer.timeMethod.

Parameters#

timingsdict [str, any]

A representation of the metadata passed to run. The dict has the following keys:

"StartTimestamp"

The time the target method started, in an ISO 8601-compliant format (str or None).

"EndTimestamp"

The time the target method ended, in an ISO 8601-compliant format (str or None).

Returns#

measurementlsst.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.