private void processJVMThreadMetrics(long processId, long startMillis, long stopMillis) { ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean(); threadMetricsProcessor.beforeProcess(processId, startMillis, stopMillis); try { threadMetricsProcessor.process(new JvmThreadMetrics(threadMXBean), processId, startMillis, stopMillis); } finally { threadMetricsProcessor.afterProcess(processId, startMillis, stopMillis); } } }