Add single stat for timing sections of code, but without probabilistic calculations saved.
Given a high throughput system, the need may arise to time sections of code without performing probabilistic calculations (PmfStat).
The purpose of this is two-fold.
1) To reduce the processor load by eliminating the PMF calculations.
2) To reduce the data storage required by storing the PMF results.
To solve this need, I’ve done the following:
Abstract PMF’s TimeManager class to BaseTimeManager
PMF’s TImeManager now inherits from BaseTimeManager,
overriding the __init__ and __exit__ functions.
Abstract PmfStatDict to StatDict. PmfStatDict now inherits from StatDict
Create new class, DoubleStat that contains the same timing functionality as PmfStat. This class returns the aforementioned StatDict (taken from PmfStatDict).
Add value field to the PmfStatDict so that along with the probabilistic calculations, the raw value is preserved also.
Add single stat for timing sections of code, but without probabilistic calculations saved.
Given a high throughput system, the need may arise to time sections of code without performing probabilistic calculations (PmfStat).
The purpose of this is two-fold.
1) To reduce the processor load by eliminating the PMF calculations.
2) To reduce the data storage required by storing the PMF results.
To solve this need, I’ve done the following:
TimeManager
class toBaseTimeManager
TImeManager
now inherits fromBaseTimeManager
, overriding the__init__
and__exit__
functions.PmfStatDict
toStatDict
.PmfStatDict
now inherits fromStatDict
DoubleStat
that contains the same timing functionality asPmfStat
. This class returns the aforementionedStatDict
(taken from PmfStatDict).value
field to the PmfStatDict so that along with the probabilistic calculations, the raw value is preserved also.