MCPcopy Create free account
hub / github.com/3rdparty/libprocess / TEST_F

Function TEST_F

src/tests/metrics_tests.cpp:122–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121
122TEST_F(MetricsTest, Counter)
123{
124 Counter counter("test/counter");
125
126 AWAIT_READY(metrics::add(counter));
127
128 AWAIT_EXPECT_EQ(0.0, counter.value());
129
130 ++counter;
131 AWAIT_EXPECT_EQ(1.0, counter.value());
132
133 counter++;
134 AWAIT_EXPECT_EQ(2.0, counter.value());
135
136 counter.reset();
137 AWAIT_EXPECT_EQ(0.0, counter.value());
138
139 counter += 42;
140 AWAIT_EXPECT_EQ(42.0, counter.value());
141
142 EXPECT_NONE(counter.statistics());
143
144 AWAIT_READY(metrics::remove(counter));
145}
146
147
148TEST_F(MetricsTest, PullGauge)

Callers

nothing calls this directly

Calls 15

addFunction · 0.85
removeFunction · 0.85
deferFunction · 0.85
PullGaugeClass · 0.85
getFunction · 0.85
OKClass · 0.85
CounterClass · 0.85
BadRequestClass · 0.85
advanceAndReturnFunction · 0.85
setAuthenticatorFunction · 0.85
UnauthorizedClass · 0.85
isPendingMethod · 0.80

Tested by

no test coverage detected