Package sonia.scm.metrics
Class Metrics
java.lang.Object
sonia.scm.metrics.Metrics
Util methods to collect metrics from known apis.
- Since:
- 2.16.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
executor
(io.micrometer.core.instrument.MeterRegistry registry, ExecutorService executorService, String name, String type) Collect metrics from anExecutorService
.static io.micrometer.core.instrument.Timer
workingCopyTimer
(io.micrometer.core.instrument.MeterRegistry registry, String type) Collect metrics from anWorkingCopy
.
-
Method Details
-
executor
public static void executor(io.micrometer.core.instrument.MeterRegistry registry, ExecutorService executorService, String name, String type) Collect metrics from anExecutorService
.- Parameters:
registry
- meter registryexecutorService
- executor service to monitorname
- name of executor servicetype
- type of executor service e.g.: cached, fixed, etc.
-
workingCopyTimer
public static io.micrometer.core.instrument.Timer workingCopyTimer(io.micrometer.core.instrument.MeterRegistry registry, String type) Collect metrics from anWorkingCopy
.- Parameters:
registry
- meter registrytype
- type of repository
-