lenskit.logging.ResourceMeasurement#

class lenskit.logging.ResourceMeasurement#

Single measurement of resources. Two measurements can be subtracted to compute the time resources consumed in an interval (memory resources are left unchanged).

Stability:
Internal (see Stability Levels).
wall_time: float#
perf_time: float#
user_time: float#
system_time: float#
max_rss: int | None = None#

Maximum RSS usage (in bytes).

max_gpu: int | None = None#
classmethod current()#

Get the current resource measurements.

property cpu_time: float#

Total CPU time (user + system).

Return type:

float

__sub__(other)#
Parameters:

other (ResourceMeasurement)