in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/ActiveWorkersCheck.java [54:65]
protected Result doCheck() throws Exception {
return Optional.ofNullable(metricRegistry.getGauges().get(ACTIVE_WORKERS_METRIC_NAME))
.map(
metric -> {
float currentInteractiveThreadsPercentage =
((long) metric.getValue() * 100) / interactiveThreadsMaxPoolSize;
return (currentInteractiveThreadsPercentage <= threshold)
? Result.PASSED
: Result.FAILED;
})
.orElse(Result.PASSED);
}