summaryrefslogtreecommitdiffstats
path: root/src/time_histogram.h
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-05-31 13:57:01 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-05-31 13:57:01 +0300
commit5d9c4aa95e28049c2bf4de1e04af73696d122e4b (patch)
treef097f9b1b12a4d42a41b0786dd1b9220bb93c3f2 /src/time_histogram.h
parent06f5cc0b5892712242344fb42cbafd873c5d0209 (diff)
Fixes and better unit test for histogram
Diffstat (limited to 'src/time_histogram.h')
-rwxr-xr-xsrc/time_histogram.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/time_histogram.h b/src/time_histogram.h
index 9bdf2c93..da70e677 100755
--- a/src/time_histogram.h
+++ b/src/time_histogram.h
@@ -85,6 +85,8 @@ public:
return period_elem.get_max_usec();
}
void dump_json(std::string name,std::string & json );
+ uint64_t get_count() {return m_total_cnt;}
+ uint64_t get_high_count() {return m_total_cnt_high;}
private:
uint32_t get_usec(dsec_t d);
@@ -103,6 +105,8 @@ private:
// Each period we switch between the two
CTimeHistogramPerPeriodData m_period_data[2];
uint8_t m_period; // 0 or 1 according to m_period_data element we currently use
+ uint64_t m_total_cnt;
+ uint64_t m_total_cnt_high;
dsec_t m_max_dt; // Total maximum latency
dsec_t m_average; /* moving average */
uint32_t m_win_cnt;