Search in sources :

Example 1 with Gauge

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;
}
Also used : Gauge(io.micrometer.api.instrument.Gauge)

Example 2 with Gauge

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();
    }
}
Also used : Gauge(io.micrometer.api.instrument.Gauge)

Example 3 with Gauge

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();
    }
}
Also used : Gauge(io.micrometer.api.instrument.Gauge)

Example 4 with Gauge

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;
}
Also used : Gauge(io.micrometer.api.instrument.Gauge)

Example 5 with Gauge

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;
}
Also used : Gauge(io.micrometer.api.instrument.Gauge)

Aggregations

Gauge (io.micrometer.api.instrument.Gauge)5