Search in sources :

Example 31 with Gauge

use of com.codahale.metrics.Gauge in project metrics by dropwizard.

the class MemoryUsageGaugeSetTest method hasAGaugeForHeapCommitted.

@Test
public void hasAGaugeForHeapCommitted() {
    final Gauge gauge = (Gauge) gauges.getMetrics().get("heap.committed");
    assertThat(gauge.getValue()).isEqualTo(10L);
}
Also used : Gauge(com.codahale.metrics.Gauge) Test(org.junit.Test)

Example 32 with Gauge

use of com.codahale.metrics.Gauge in project metrics by dropwizard.

the class MemoryUsageGaugeSetTest method hasAGaugeForNonHeapUsed.

@Test
public void hasAGaugeForNonHeapUsed() {
    final Gauge gauge = (Gauge) gauges.getMetrics().get("non-heap.used");
    assertThat(gauge.getValue()).isEqualTo(3L);
}
Also used : Gauge(com.codahale.metrics.Gauge) Test(org.junit.Test)

Example 33 with Gauge

use of com.codahale.metrics.Gauge in project metrics by dropwizard.

the class MemoryUsageGaugeSetTest method hasAGaugeForTotalUsed.

@Test
public void hasAGaugeForTotalUsed() {
    final Gauge gauge = (Gauge) gauges.getMetrics().get("total.used");
    assertThat(gauge.getValue()).isEqualTo(33L);
}
Also used : Gauge(com.codahale.metrics.Gauge) Test(org.junit.Test)

Example 34 with Gauge

use of com.codahale.metrics.Gauge in project metrics by dropwizard.

the class MemoryUsageGaugeSetTest method hasAGaugeForTotalInit.

@Test
public void hasAGaugeForTotalInit() {
    final Gauge gauge = (Gauge) gauges.getMetrics().get("total.init");
    assertThat(gauge.getValue()).isEqualTo(22L);
}
Also used : Gauge(com.codahale.metrics.Gauge) Test(org.junit.Test)

Example 35 with Gauge

use of com.codahale.metrics.Gauge in project metrics by dropwizard.

the class MemoryUsageGaugeSetTest method hasAGaugeForWeirdMemoryPoolUsage.

@Test
public void hasAGaugeForWeirdMemoryPoolUsage() {
    final Gauge gauge = (Gauge) gauges.getMetrics().get("pools.Weird-Pool.usage");
    assertThat(gauge.getValue()).isEqualTo(3.0);
}
Also used : Gauge(com.codahale.metrics.Gauge) Test(org.junit.Test)

Aggregations

Gauge (com.codahale.metrics.Gauge)64 Test (org.junit.Test)43 Counter (com.codahale.metrics.Counter)10 MetricRegistry (com.codahale.metrics.MetricRegistry)9 Meter (com.codahale.metrics.Meter)8 Metric (com.codahale.metrics.Metric)8 Timer (com.codahale.metrics.Timer)7 SortedMap (java.util.SortedMap)7 Histogram (com.codahale.metrics.Histogram)6 Map (java.util.Map)6 Matchers.anyString (org.mockito.Matchers.anyString)3 Snapshot (com.codahale.metrics.Snapshot)2 Date (java.util.Date)2 HashMap (java.util.HashMap)2 TreeMap (java.util.TreeMap)2 Semaphore (java.util.concurrent.Semaphore)2 SolrMetricManager (org.apache.solr.metrics.SolrMetricManager)2 SolrQueryRequest (org.apache.solr.request.SolrQueryRequest)2 ValueList (org.collectd.api.ValueList)2 Assertion (org.opensaml.saml.saml2.core.Assertion)2