Skip to content

Commit 70502e1

Browse files
committed
Review feedback: doc comments
Signed-off-by: Otto van der Schaaf <[email protected]>
1 parent 027c00f commit 70502e1

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

source/common/thread_safe_monotonic_time_stopwatch.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@
88
namespace 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
*/
1321
class ThreadSafeMontonicTimeStopwatch : public Stopwatch {
1422
public:

source/server/http_time_tracking_filter.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Nighthawk {
1515
namespace 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
*/
2121
class HttpTimeTrackingFilterConfig {
@@ -56,9 +56,17 @@ class HttpTimeTrackingFilterConfig {
5656

5757
using HttpTimeTrackingFilterConfigSharedPtr = std::shared_ptr<HttpTimeTrackingFilterConfig>;
5858

59+
/**
60+
* Extension that tracks elapsed time between inbound requests.
61+
*/
5962
class HttpTimeTrackingFilter : public Envoy::Http::PassThroughFilter {
6063
public:
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,

0 commit comments

Comments
 (0)