File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 88namespace Nighthawk {
99
1010/* *
11- * Utility class for thread safe tracking of elapsed monotonic time.
11+ * Utility class for thread safe tracking of elapsed monotonic time.
12+ * Example usage:
13+ *
14+ * ThreadSafeMontonicTimeStopwatch stopwatch;
15+ * int i = 0;
16+ * do {
17+ * std::cerr << stopwatch.getElapsedNsAndReset() <<
18+ * "ns elapsed since last iteration." << std::endl;
19+ * } while (++i < 100);
1220 */
1321class ThreadSafeMontonicTimeStopwatch : public Stopwatch {
1422public:
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ namespace Nighthawk {
1515namespace Server {
1616
1717/* *
18- * Filter configuration container class for the test server extension.
18+ * Filter configuration container class for the time tracking extension.
1919 * Instances of this class will be shared accross instances of HttpTimeTrackingFilter.
2020 */
2121class HttpTimeTrackingFilterConfig {
@@ -56,9 +56,17 @@ class HttpTimeTrackingFilterConfig {
5656
5757using HttpTimeTrackingFilterConfigSharedPtr = std::shared_ptr<HttpTimeTrackingFilterConfig>;
5858
59+ /* *
60+ * Extension that tracks elapsed time between inbound requests.
61+ */
5962class HttpTimeTrackingFilter : public Envoy ::Http::PassThroughFilter {
6063public:
61- HttpTimeTrackingFilter (HttpTimeTrackingFilterConfigSharedPtr);
64+ /* *
65+ * Construct a new Http Time Tracking Filter object.
66+ *
67+ * @param config Configuration of the extension.
68+ */
69+ HttpTimeTrackingFilter (HttpTimeTrackingFilterConfigSharedPtr config);
6270
6371 // Http::StreamDecoderFilter
6472 Envoy::Http::FilterHeadersStatus decodeHeaders (Envoy::Http::RequestHeaderMap& headers,
You can’t perform that action at this time.
0 commit comments