dynast.stats
Module Contents
Classes
Class that represents a processing step. |
|
Class used to collect run statistics. |
- class dynast.stats.Step(skipped=False, **kwargs)
Class that represents a processing step.
- start(self)
Signal the step has started.
- end(self)
Signal the step has ended.
- to_dict(self)
Convert this step to a dictionary.
- Returns
dictionary of class variables
- Return type
dictionary
- class dynast.stats.Stats
Class used to collect run statistics.
- start(self)
Start collecting statistics.
Sets start time, the command line call.
- end(self)
End collecting statistics.
- step(self, key, skipped=False, **kwargs)
Register a processing step.
Any additional keyword arguments are passed to the constructor of Step.
- Parameters
key (str) – processing key
skipped (bool, optional) – whether or not this step is skipped, defaults to False
- save(self, path)
Save statistics as JSON to path.
- Parameters
path (str) – path to JSON
- Returns
path to saved JSON
- Return type
str
- to_dict(self)
Convert statistics to dictionary, so that it is easily parsed by the report-rendering functions.