descwl.trace module

Trace program resource usage.

class descwl.trace.Memory(enabled)[source]

Bases: object

Trace memory usage for the current program.

Parameters:enabled (bool) – Enable memory tracing.
__call__(label)[source]

Register a memory usage checkpoint.

This method does nothing if this object was initialized with enabled = False.

Parameters:label (str) – A brief description of this checkpoint.