mendevi.utils.Activity
- class mendevi.utils.Activity(sleep: Real = 0.05)[source]
Measure the computer activity of a section.
Examples
>>> import pprint, time >>> from mendevi.utils import Activity >>> with Activity() as activity: ... time.sleep(1) ... >>> pprint.pprint(activity) >>>
Initalize the perf context.
Parameters
- sleepfloat, default=50e-3
The time interval between 2 measures (in s).