@@ -55,7 +55,7 @@ class Monitoring
5555 void send (Metric&& metric, DerivedMetricMode mode = DerivedMetricMode::NONE);
5656
5757 // / Sends multiple not related to each other metrics
58- // / \@ param metrics vector of metrics
58+ // / \param metrics vector of metrics
5959 void send (std::vector<Metric>&& metrics);
6060
6161 // / Sends multiple realated to each other metrics under a common measurement name
@@ -67,18 +67,25 @@ class Monitoring
6767
6868 // / Enables process monitoring
6969 // / \param interval refresh interval
70- void enableProcessMonitoring (int interval = 5 );
70+ void enableProcessMonitoring (const unsigned int interval = 5 );
7171
7272 // / Starts timing
7373 // / Sets a start timestamp and timeout
74- // / \@ param name metric name
75- // / \@ param timeout timeout
74+ // / \param name metric name
75+ // / \param timeout timeout
7676 void startTimer (std::string name);
7777
7878 // / Stops timing
7979 // / Sets stop timestamp, calculates delta and sends value
80- // / \@ param name metric name
80+ // / \param name metric name
8181 void stopAndSendTimer (std::string name);
82+
83+ // / Flushes metric buffer (this can also happen when buffer is full)
84+ void flushBuffer ();
85+
86+ // / Enables metric buffering
87+ // / \param size buffer size
88+ void enableBuffering (const unsigned int size = 20 );
8289 private:
8390 // / Derived metrics handler
8491 // / \see class DerivedMetrics
@@ -102,6 +109,15 @@ class Monitoring
102109 // / Process Monitor thread loop
103110 // / \param interval sleep time in seconds
104111 void processMonitorLoop (int interval);
112+
113+ // / Metric buffer
114+ std::vector<Metric> mStorage ;
115+
116+ // / Flag stating whether metric buffering is enabled
117+ bool mBuffering ;
118+
119+ // / Size of buffer
120+ unsigned int mBufferSize ;
105121};
106122
107123} // namespace monitoring
0 commit comments