MetricsUtils

Utility object providing factory methods for common HealthCheck patterns.

Unhealthy results read "Large size: N (threshold: T)".

Functions

Link copied to clipboard
fun newBacklogHealthCheck(backlogSize: () -> Int, size: Int): HealthCheck

Creates a HealthCheck that reports unhealthy when the backlog size meets or exceeds the given threshold.

fun newBacklogHealthCheck(backlogSize: Int, size: Int): HealthCheck

Creates a HealthCheck that reports unhealthy when backlogSize meets or exceeds the given threshold.

Link copied to clipboard
fun newMapHealthCheck(map: Map<*, *>, size: Int): HealthCheck

Creates a HealthCheck that reports unhealthy when the map size meets or exceeds the given threshold.