use of io.micrometer.core.instrument.binder.jvm.ExecutorServiceMetrics in project micrometer by micrometer-metrics.
the class ExecutorServiceSample method main.
public static void main(String[] args) {
MeterRegistry registry = SampleConfig.myMonitoringSystem();
ScheduledExecutorService es = Executors.newSingleThreadScheduledExecutor();
new ExecutorServiceMetrics(es, "executor.sample", emptyList()).bindTo(registry);
es.scheduleWithFixedDelay(() -> Mono.delay(Duration.ofMillis(20)).block(), 0, 10, TimeUnit.MILLISECONDS);
while (true) {
}
}
Aggregations