Search in sources :

Example 11 with Gauge

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

the class MemoryUsageGaugeSetTest method hasAGaugeForTotalCommitted.

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

Example 12 with Gauge

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

the class MemoryUsageGaugeSetTest method hasAGaugeForNonHeapMax.

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

Example 13 with Gauge

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

the class MemoryUsageGaugeSetTest method hasAGaugeForWeirdMemoryPoolCommitted.

@Test
public void hasAGaugeForWeirdMemoryPoolCommitted() throws Exception {
    final Gauge gauge = (Gauge) gauges.getMetrics().get("pools.Weird-Pool.committed");
    assertThat(gauge.getValue()).isEqualTo(100L);
}
Also used : Gauge(com.codahale.metrics.Gauge) Test(org.junit.Test)

Example 14 with Gauge

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

the class MemoryUsageGaugeSetTest method hasAGaugeForWeirdMemoryPoolUsed.

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

Example 15 with Gauge

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

the class MemoryUsageGaugeSetTest method hasAGaugeForNonHeapUsed.

@Test
public void hasAGaugeForNonHeapUsed() throws Exception {
    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)

Aggregations

Gauge (com.codahale.metrics.Gauge)57 Test (org.junit.Test)38 Counter (com.codahale.metrics.Counter)10 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 MetricRegistry (com.codahale.metrics.MetricRegistry)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 AsmGauge (com.alibaba.jstorm.common.metric.AsmGauge)1 MetricSet (com.codahale.metrics.MetricSet)1