use of com.codahale.metrics.jvm.CachedThreadStatesGaugeSet in project infrautils by opendaylight.
the class MetricProviderImpl method setUpJvmMetrics.
private static void setUpJvmMetrics(MetricRegistry registry) {
ThreadDeadlockDetector threadDeadlockDetector = new ThreadDeadlockDetector();
FileDescriptorRatioGauge fileDescriptorRatioGauge = new FileDescriptorRatioGauge();
registry.registerAll(new GarbageCollectorMetricSet());
registry.registerAll(new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()));
registry.registerAll(new CachedThreadStatesGaugeSet(getThreadMXBean(), threadDeadlockDetector, 13, SECONDS));
registry.registerAll(new MemoryUsageGaugeSet());
registry.registerAll(new ClassLoadingGaugeSet());
registry.gauge("odl.infrautils.FileDescriptorRatio", () -> fileDescriptorRatioGauge);
}
use of com.codahale.metrics.jvm.CachedThreadStatesGaugeSet in project knox by apache.
the class DefaultMetricsService method registerJvmMetricSets.
private void registerJvmMetricSets() {
metrics.registerAll(new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()));
metrics.registerAll(new CachedThreadStatesGaugeSet(5, TimeUnit.MINUTES));
metrics.registerAll(new ClassLoadingGaugeSet());
metrics.registerAll(new GarbageCollectorMetricSet());
metrics.registerAll(new JvmAttributeGaugeSet());
metrics.registerAll(new MemoryUsageGaugeSet());
}
Aggregations