avalanche.evaluation.metrics.CPUUsage

class avalanche.evaluation.metrics.CPUUsage[source]

The standalone CPU usage metric.

Instances of this metric compute the average CPU usage as a float value. The metric starts tracking the CPU usage when the update method is called for the first time. That is, the tracking does not start at the time the constructor is invoked.

Calling the update method more than twice will update the metric to the average usage between the first and the last call to update.

The result, obtained using the result method, is the usage computed as stated above.

The reset method will bring the metric to its initial state. By default this metric in its initial state will return an usage value of 0.

__init__()[source]

Creates an instance of the standalone CPU usage metric.

By default this metric in its initial state will return a CPU usage value of 0. The metric can be updated by using the update method while the average CPU usage can be retrieved using the result method.

Methods

__init__()

Creates an instance of the standalone CPU usage metric.

reset()

Resets the metric.

result()

Retrieves the average CPU usage.

update()

Update the running CPU usage.