Package org.kiwiproject.beta.health
Class SimpleMeterHealthCheck
- java.lang.Object
-
- com.codahale.metrics.health.HealthCheck
-
- org.kiwiproject.beta.health.SimpleMeterHealthCheck
-
@Beta public class SimpleMeterHealthCheck extends com.codahale.metrics.health.HealthCheckVery simple health check that checks if aMeterhas any errors in the last 15 minutes, calculated using the 15-minute rate from the meter. The returned results are built usingHealthCheckResultsso they contain a "severity" detail.- See Also:
HealthCheckResults- Implementation Note:
- If the
Meterfrom Metrics library uses exponentially-weighted moving averages, it is actually not trivial to compute an exact number of errors in the last N time units. Here, this is using the 15-minute rate from the supplied meter and using that to estimate the number of errors. See specificallyMovingAveragesandMeter(MovingAverages).
-
-
Constructor Summary
Constructors Constructor Description SimpleMeterHealthCheck(String name, com.codahale.metrics.Meter meter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.codahale.metrics.health.HealthCheck.Resultcheck()
-
-
-
Constructor Detail
-
SimpleMeterHealthCheck
public SimpleMeterHealthCheck(String name, com.codahale.metrics.Meter meter)
-
-