MemoryMetricTask#
- class lsst.verify.tasks.MemoryMetricTask(**kwargs)#
Bases:
MetadataMetricTaskA Task that computes the maximum resident set size 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(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#
- 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()."EndMemory"The key for the memory usage at the end of the method (
str)."MetadataVersion"The key for the task-level metadata version.
- config
- makeMeasurement(memory)#
Compute a maximum resident set size measurement from metadata provided by
lsst.utils.timer.timeMethod.Parameters#
- memory
dict[str, any] A representation of the metadata passed to
run. Eachdicthas the following keys:"EndMemory"The memory usage at the end of the method (
intorNone)."MetadataVersion"The version of the task metadata in which the value was stored (
intorNone).Noneis assumed to be version 0.
Returns#
- measurement
lsst.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.
- memory