25 #ifndef ACE_TIME_TIMING_STATS_H 26 #define ACE_TIME_TIMING_STATS_H 53 uint16_t getMax()
const {
return mMax; }
55 uint16_t getMin()
const {
return mMin; }
57 uint16_t getAvg()
const {
return (mCount > 0) ? mSum / mCount : 0; }
72 void update(uint16_t duration) {
76 if (duration < mMin) {
79 if (duration > mMax) {
82 mExpDecayAvg = (mExpDecayAvg + duration) / 2;
86 uint16_t mExpDecayAvg;
uint16_t getCount() const
Number of times update() was called since last reset.
uint16_t getCounter() const
Number of times update() was called from the beginning of time.
TimingStats()
Constructor.
Helper class to collect timing statistics such as min, max, average.
uint16_t getExpDecayAvg() const
An exponential decay average.