use of io.micrometer.api.instrument.Gauge in project reactor-netty by reactor.
the class PooledConnectionProviderDefaultMetricsTest method getGaugeValue.
private double getGaugeValue(String gaugeName, String poolName) {
Gauge gauge = registry.find(gaugeName).tag(NAME, poolName).gauge();
double result = -1;
if (gauge != null) {
result = gauge.value();
}
return result;
}
use of io.micrometer.api.instrument.Gauge in project reactor-netty by reactor.
the class TcpMetricsTests method checkGauge.
void checkGauge(String name, String[] tags, double expectedCount, boolean exists) {
Gauge counter = registry.find(name).tags(tags).gauge();
if (exists) {
assertThat(counter).isNotNull();
assertThat(counter.value() == expectedCount).isTrue();
} else {
assertThat(counter).isNull();
}
}
use of io.micrometer.api.instrument.Gauge in project reactor-netty by reactor.
the class HttpMetricsHandlerTests method checkGauge.
void checkGauge(String name, boolean exists, double expectedCount, String... tags) {
Gauge gauge = registry.find(name).tags(tags).gauge();
if (exists) {
assertThat(gauge).isNotNull();
assertThat(gauge.value() == expectedCount).isTrue();
} else {
assertThat(gauge).isNull();
}
}
use of io.micrometer.api.instrument.Gauge in project reactor-netty by reactor.
the class TransportEventLoopMetricsTest method getGaugeValue.
private double getGaugeValue(String name, String... tags) {
Gauge gauge = registry.find(name).tags(tags).gauge();
double result = -1;
if (gauge != null) {
result = gauge.value();
}
return result;
}
use of io.micrometer.api.instrument.Gauge in project reactor-netty by reactor.
the class ByteBufAllocatorMetricsTest method getGaugeValue.
private double getGaugeValue(String name, String... tags) {
Gauge gauge = registry.find(name).tags(tags).gauge();
double result = -1;
if (gauge != null) {
result = gauge.value();
}
return result;
}
Aggregations