Search in sources :

Example 1 with BufferMetric

use of com.navercorp.pinpoint.profiler.monitor.metric.buffer.BufferMetric in project pinpoint by naver.

the class BufferMetricProviderTest method get.

@Test
public void get() {
    Provider<BufferMetric> provider = new BufferMetricProvider();
    BufferMetric bufferMetric = provider.get();
    BufferMetricSnapshot snapshot = bufferMetric.getSnapshot();
    Assert.assertEquals(snapshot.getDirectCount(), BufferMetric.UNCOLLECTED_VALUE);
}
Also used : BufferMetric(com.navercorp.pinpoint.profiler.monitor.metric.buffer.BufferMetric) BufferMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.buffer.BufferMetricSnapshot) Test(org.junit.Test)

Example 2 with BufferMetric

use of com.navercorp.pinpoint.profiler.monitor.metric.buffer.BufferMetric in project pinpoint by naver.

the class BufferMetricProvider method get.

@Override
public BufferMetric get() {
    final JvmVersion jvmVersion = JvmUtils.getVersion();
    if (!jvmVersion.onOrAfter(JvmVersion.JAVA_7)) {
        logger.debug("Unsupported JVM version. {}", jvmVersion);
        return BufferMetric.UNSUPPORTED_BUFFER_METRIC;
    }
    BufferMetric bufferMetric = createBufferMetric(BUFFER_METRIC);
    logger.info("loaded : {}", bufferMetric);
    return bufferMetric;
}
Also used : BufferMetric(com.navercorp.pinpoint.profiler.monitor.metric.buffer.BufferMetric) JvmVersion(com.navercorp.pinpoint.common.util.JvmVersion)

Aggregations

BufferMetric (com.navercorp.pinpoint.profiler.monitor.metric.buffer.BufferMetric)2 JvmVersion (com.navercorp.pinpoint.common.util.JvmVersion)1 BufferMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.buffer.BufferMetricSnapshot)1 Test (org.junit.Test)1