use of com.netflix.servo.monitor.StepCounter in project tutorials by eugenp.
the class MetricTypeTest method givenStepCounter_whenManipulate_thenRateValid.
@Ignore
@Test
public void givenStepCounter_whenManipulate_thenRateValid() throws Exception {
System.setProperty("servo.pollers", "1000");
Counter counter = new StepCounter(MonitorConfig.builder("test").build());
assertEquals("counter should start with rate 0.0", 0.0, counter.getValue());
counter.increment();
SECONDS.sleep(1);
assertEquals("counter rate should have increased to 1.0", 1.0, counter.getValue());
}
Aggregations