Skip to content

Commit b39d948

Browse files
committed
fix windows and formating
1 parent 0684465 commit b39d948

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

include/datadog/telemetry/telemetry.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ void report_error_log(std::string message);
7474
void report_error_log(std::string message, std::string stacktrace);
7575

7676
/// The `counter` namespace provides functions to track values.
77-
/// Counters can be useful for tracking the total number of an event occurring in
78-
/// one time interval. For example, the amount of requests, errors or jobs
77+
/// Counters can be useful for tracking the total number of an event occurring
78+
/// in one time interval. For example, the amount of requests, errors or jobs
7979
/// processed every 10 seconds.
8080
namespace counter {
8181

@@ -118,7 +118,7 @@ void set(const Counter& counter, const std::vector<std::string>& tags,
118118
} // namespace counter
119119

120120
/// The `rate` namespace provides support for rate metrics-values.
121-
/// Rates can be useful for tracking the total number of an event occurrences in
121+
/// Rates can be useful for tracking the total number of an event occurrences in
122122
/// one time interval. For example, the number of requests per second.
123123
namespace rate {
124124

test/telemetry/test_telemetry.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,9 @@ TELEMETRY_IMPLEMENTATION_TEST("Tracer telemetry lifecycle") {
294294
}
295295

296296
TELEMETRY_IMPLEMENTATION_TEST("Tracer telemetry API") {
297-
const std::time_t mock_time = 1672484400;
298-
const Clock clock = [&mock_time]() {
297+
const Clock clock = [] {
299298
TimePoint result;
300-
result.wall = std::chrono::system_clock::from_time_t(mock_time);
299+
result.wall = std::chrono::system_clock::from_time_t(1672484400);
301300
return result;
302301
};
303302

@@ -606,11 +605,6 @@ TELEMETRY_IMPLEMENTATION_TEST("Tracer telemetry API") {
606605

607606
SECTION("dtor sends metrics and distributions") {
608607
// metrics captured before the aggregation task
609-
const Clock clock = [] {
610-
TimePoint result;
611-
result.wall = std::chrono::system_clock::from_time_t(1744706125);
612-
return result;
613-
};
614608
const Distribution response_time{"response_time", "dist-test", false};
615609
const Rate rps{"request", "rate-test", true};
616610
const Counter my_counter{"my_counter", "counter-test", true};
@@ -642,7 +636,7 @@ TELEMETRY_IMPLEMENTATION_TEST("Tracer telemetry API") {
642636
"metric":"my_counter",
643637
"namespace":"counter-test",
644638
"type": "count",
645-
"points": [[1744706125, 1]]
639+
"points": [[1672484400, 1]]
646640
}
647641
)");
648642
CHECK(s == expected_counter);
@@ -653,7 +647,7 @@ TELEMETRY_IMPLEMENTATION_TEST("Tracer telemetry API") {
653647
"metric":"request",
654648
"namespace":"rate-test",
655649
"type": "rate",
656-
"points": [[1744706125, 1000]]
650+
"points": [[1672484400, 1000]]
657651
}
658652
)");
659653
CHECK(s == expected_rate);

0 commit comments

Comments
 (0)