MemoryMetricTask#

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

Bases: MetadataMetricTask

A Task that computes the maximum resident set size 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(memory)

Compute a maximum resident set size 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().

"EndMemory"

The key for the memory usage at the end of the method (str).

"MetadataVersion"

The key for the task-level metadata version.

makeMeasurement(memory)#

Compute a maximum resident set size measurement from metadata provided by lsst.utils.timer.timeMethod.

Parameters#

memorydict [str, any]

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

"EndMemory"

The memory usage at the end of the method (int or None).

"MetadataVersion"

The version of the task metadata in which the value was stored (int or None). None is assumed to be version 0.

Returns#

measurementlsst.verify.Measurement

The maximum memory usage of the target method.

Raises#

lsst.verify.tasks.MetricComputationError

Raised if the memory metadata are invalid.

lsst.pipe.base.NoWorkFound

Raised if no matching memory metadata found.