Class DelayMetricEmittingScheduledExecutorService

All Implemented Interfaces:
Executor, ExecutorService, ScheduledExecutorService

public class DelayMetricEmittingScheduledExecutorService extends DecoratedScheduledExecutorService
A DecoratedScheduledExecutorService that emits a scheduling delay metric each time a task runs. The metric value is the difference between the actual time from submission to execution and the intended delay, in milliseconds, floored at zero.

Use ScheduledExecutors.emittingDelayMetric(java.util.concurrent.ScheduledExecutorService, org.apache.druid.java.util.emitter.service.ServiceEmitter, java.lang.String, java.util.Map<java.lang.String, java.lang.Object>) for convenience.