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.HealthCheck
Basic health check that checks if a
Meter has any errors in the last 15 minutes, calculated
using the 15-minute rate from the meter. The returned results are built using HealthCheckResults so
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).
-
Nested Class Summary
Nested classes/interfaces inherited from class com.codahale.metrics.health.HealthCheck
com.codahale.metrics.health.HealthCheck.Result, com.codahale.metrics.health.HealthCheck.ResultBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.codahale.metrics.health.HealthCheck.Resultcheck()Methods inherited from class com.codahale.metrics.health.HealthCheck
clock, execute
-
Constructor Details
-
SimpleMeterHealthCheck
-
-
Method Details
-
check
protected com.codahale.metrics.health.HealthCheck.Result check()- Specified by:
checkin classcom.codahale.metrics.health.HealthCheck
-