dropwizard/metrics — pull request #544 by dwhjames (2014-03-20 23:09:19+00:00)
Title: add an instrumented ScheduledExecutorService

The instrumented decorator for ScheduledExecutorService follows the instrumented decorator ExecutorService. It uses the same four metrics, as well as adding an additional four.

The original four:
- "submitted": is a meter only for invocations of `execute`, `submit`, `invokeAll`, and `invokeAny`.
- "running": is a counter for *all* running tasks.
- "completed": is a meter for *all* task completions.
- "duration": is a timer for the execution time of *all* tasks.

The new four:
- "scheduled.once": is a meter only for invocations of `schedule`.
- "scheduled.repeatedly": is a meter only for invocations of `scheduleAtFixedRate` and `scheduleWithFixedDelay`.
- "scheduled.overrun": is a counter for tasks started by `scheduleAtFixedRate`. The counter is incremented whenever the execution time of a task is greater than the scheduled period (thus causing delayed execution of the next task).
- "percent-of-period": is a histogram for tasks started by `scheduleAtFixedRate` and records the execution time of a task as a percentage of the scheduled period.