Skip to content

Commit 96b6c51

Browse files
committed
Apply clang-format
1 parent 9f3c974 commit 96b6c51

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

core/include/prometheus/counter.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "prometheus/gauge.h"
77

88
namespace prometheus {
9+
910
class Counter {
1011
public:
1112
static const MetricType metric_type = MetricType::Counter;
@@ -19,4 +20,5 @@ class Counter {
1920
private:
2021
Gauge gauge_;
2122
};
22-
}
23+
24+
} // namespace prometheus

core/src/counter.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ ClientMetric Counter::Collect() {
1313
metric.counter.value = Value();
1414
return metric;
1515
}
16-
}
16+
17+
} // namespace prometheus

core/tests/benchmark/counter_bench.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#include <prometheus/registry.h>
33

44
static void BM_Counter_Increment(benchmark::State& state) {
5-
using prometheus::Registry;
6-
using prometheus::Counter;
75
using prometheus::BuildCounter;
6+
using prometheus::Counter;
7+
using prometheus::Registry;
88
Registry registry;
99
auto& counter_family =
1010
BuildCounter().Name("benchmark_counter").Help("").Register(registry);
@@ -15,9 +15,9 @@ static void BM_Counter_Increment(benchmark::State& state) {
1515
BENCHMARK(BM_Counter_Increment);
1616

1717
static void BM_Counter_Collect(benchmark::State& state) {
18-
using prometheus::Registry;
19-
using prometheus::Counter;
2018
using prometheus::BuildCounter;
19+
using prometheus::Counter;
20+
using prometheus::Registry;
2121
Registry registry;
2222
auto& counter_family =
2323
BuildCounter().Name("benchmark_counter").Help("").Register(registry);

core/tests/benchmark/gauge_bench.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#include <prometheus/registry.h>
33

44
static void BM_Gauge_Increment(benchmark::State& state) {
5-
using prometheus::Registry;
6-
using prometheus::Gauge;
75
using prometheus::BuildGauge;
6+
using prometheus::Gauge;
7+
using prometheus::Registry;
88
Registry registry;
99
auto& gauge_family =
1010
BuildGauge().Name("benchmark_gauge").Help("").Register(registry);
@@ -15,9 +15,9 @@ static void BM_Gauge_Increment(benchmark::State& state) {
1515
BENCHMARK(BM_Gauge_Increment);
1616

1717
static void BM_Gauge_Decrement(benchmark::State& state) {
18-
using prometheus::Registry;
19-
using prometheus::Gauge;
2018
using prometheus::BuildGauge;
19+
using prometheus::Gauge;
20+
using prometheus::Registry;
2121
Registry registry;
2222
auto& gauge_family =
2323
BuildGauge().Name("benchmark_gauge").Help("").Register(registry);
@@ -28,9 +28,9 @@ static void BM_Gauge_Decrement(benchmark::State& state) {
2828
BENCHMARK(BM_Gauge_Decrement);
2929

3030
static void BM_Gauge_SetToCurrentTime(benchmark::State& state) {
31-
using prometheus::Registry;
32-
using prometheus::Gauge;
3331
using prometheus::BuildGauge;
32+
using prometheus::Gauge;
33+
using prometheus::Registry;
3434
Registry registry;
3535
auto& gauge_family =
3636
BuildGauge().Name("benchmark_gauge").Help("").Register(registry);
@@ -41,9 +41,9 @@ static void BM_Gauge_SetToCurrentTime(benchmark::State& state) {
4141
BENCHMARK(BM_Gauge_SetToCurrentTime);
4242

4343
static void BM_Gauge_Collect(benchmark::State& state) {
44-
using prometheus::Registry;
45-
using prometheus::Gauge;
4644
using prometheus::BuildGauge;
45+
using prometheus::Gauge;
46+
using prometheus::Registry;
4747
Registry registry;
4848
auto& gauge_family =
4949
BuildGauge().Name("benchmark_gauge").Help("").Register(registry);

0 commit comments

Comments
 (0)