From 5d9c4aa95e28049c2bf4de1e04af73696d122e4b Mon Sep 17 00:00:00 2001 From: Ido Barnea Date: Tue, 31 May 2016 13:57:01 +0300 Subject: Fixes and better unit test for histogram --- src/time_histogram.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/time_histogram.h') 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; -- cgit