Search in sources :

Example 6 with Gauge

use of org.apache.flink.metrics.Gauge in project flink by apache.

the class ScheduledDropwizardReporterTest method testMetricCleanup.

/**
	 * This test verifies that metrics are properly added and removed to/from the ScheduledDropwizardReporter and
	 * the underlying Dropwizard MetricRegistry.
	 */
@Test
public void testMetricCleanup() {
    TestingScheduledDropwizardReporter rep = new TestingScheduledDropwizardReporter();
    MetricGroup mp = new UnregisteredMetricsGroup();
    Counter c = new SimpleCounter();
    Meter m = new Meter() {

        @Override
        public void markEvent() {
        }

        @Override
        public void markEvent(long n) {
        }

        @Override
        public double getRate() {
            return 0;
        }

        @Override
        public long getCount() {
            return 0;
        }
    };
    Histogram h = new Histogram() {

        @Override
        public void update(long value) {
        }

        @Override
        public long getCount() {
            return 0;
        }

        @Override
        public HistogramStatistics getStatistics() {
            return null;
        }
    };
    Gauge g = new Gauge() {

        @Override
        public Object getValue() {
            return null;
        }
    };
    rep.notifyOfAddedMetric(c, "counter", mp);
    assertEquals(1, rep.getCounters().size());
    assertEquals(1, rep.registry.getCounters().size());
    rep.notifyOfAddedMetric(m, "meter", mp);
    assertEquals(1, rep.getMeters().size());
    assertEquals(1, rep.registry.getMeters().size());
    rep.notifyOfAddedMetric(h, "histogram", mp);
    assertEquals(1, rep.getHistograms().size());
    assertEquals(1, rep.registry.getHistograms().size());
    rep.notifyOfAddedMetric(g, "gauge", mp);
    assertEquals(1, rep.getGauges().size());
    assertEquals(1, rep.registry.getGauges().size());
    rep.notifyOfRemovedMetric(c, "counter", mp);
    assertEquals(0, rep.getCounters().size());
    assertEquals(0, rep.registry.getCounters().size());
    rep.notifyOfRemovedMetric(m, "meter", mp);
    assertEquals(0, rep.getMeters().size());
    assertEquals(0, rep.registry.getMeters().size());
    rep.notifyOfRemovedMetric(h, "histogram", mp);
    assertEquals(0, rep.getHistograms().size());
    assertEquals(0, rep.registry.getHistograms().size());
    rep.notifyOfRemovedMetric(g, "gauge", mp);
    assertEquals(0, rep.getGauges().size());
    assertEquals(0, rep.registry.getGauges().size());
}
Also used : UnregisteredMetricsGroup(org.apache.flink.metrics.groups.UnregisteredMetricsGroup) Histogram(org.apache.flink.metrics.Histogram) SimpleCounter(org.apache.flink.metrics.SimpleCounter) Counter(org.apache.flink.metrics.Counter) SimpleCounter(org.apache.flink.metrics.SimpleCounter) Meter(org.apache.flink.metrics.Meter) TaskMetricGroup(org.apache.flink.runtime.metrics.groups.TaskMetricGroup) TaskManagerMetricGroup(org.apache.flink.runtime.metrics.groups.TaskManagerMetricGroup) TaskManagerJobMetricGroup(org.apache.flink.runtime.metrics.groups.TaskManagerJobMetricGroup) MetricGroup(org.apache.flink.metrics.MetricGroup) Gauge(org.apache.flink.metrics.Gauge) Test(org.junit.Test)

Example 7 with Gauge

use of org.apache.flink.metrics.Gauge in project flink by apache.

the class TaskExecutorMetricsInitializer method instantiateGarbageCollectorMetrics.

private static void instantiateGarbageCollectorMetrics(MetricGroup metrics) {
    List<GarbageCollectorMXBean> garbageCollectors = ManagementFactory.getGarbageCollectorMXBeans();
    for (final GarbageCollectorMXBean garbageCollector : garbageCollectors) {
        MetricGroup gcGroup = metrics.addGroup(garbageCollector.getName());
        gcGroup.<Long, Gauge<Long>>gauge("Count", new Gauge<Long>() {

            @Override
            public Long getValue() {
                return garbageCollector.getCollectionCount();
            }
        });
        gcGroup.<Long, Gauge<Long>>gauge("Time", new Gauge<Long>() {

            @Override
            public Long getValue() {
                return garbageCollector.getCollectionTime();
            }
        });
    }
}
Also used : GarbageCollectorMXBean(java.lang.management.GarbageCollectorMXBean) MetricGroup(org.apache.flink.metrics.MetricGroup) Gauge(org.apache.flink.metrics.Gauge)

Example 8 with Gauge

use of org.apache.flink.metrics.Gauge in project flink by apache.

the class TaskExecutorMetricsInitializer method instantiateThreadMetrics.

private static void instantiateThreadMetrics(MetricGroup metrics) {
    final ThreadMXBean mxBean = ManagementFactory.getThreadMXBean();
    metrics.<Integer, Gauge<Integer>>gauge("Count", new Gauge<Integer>() {

        @Override
        public Integer getValue() {
            return mxBean.getThreadCount();
        }
    });
}
Also used : ThreadMXBean(java.lang.management.ThreadMXBean) Gauge(org.apache.flink.metrics.Gauge)

Example 9 with Gauge

use of org.apache.flink.metrics.Gauge in project flink by apache.

the class MetricDumpSerializerTest method testSerialization.

@Test
public void testSerialization() throws IOException {
    MetricDumpSerialization.MetricDumpSerializer serializer = new MetricDumpSerialization.MetricDumpSerializer();
    MetricDumpSerialization.MetricDumpDeserializer deserializer = new MetricDumpSerialization.MetricDumpDeserializer();
    Map<Counter, Tuple2<QueryScopeInfo, String>> counters = new HashMap<>();
    Map<Gauge<?>, Tuple2<QueryScopeInfo, String>> gauges = new HashMap<>();
    Map<Histogram, Tuple2<QueryScopeInfo, String>> histograms = new HashMap<>();
    Map<Meter, Tuple2<QueryScopeInfo, String>> meters = new HashMap<>();
    SimpleCounter c1 = new SimpleCounter();
    SimpleCounter c2 = new SimpleCounter();
    c1.inc(1);
    c2.inc(2);
    Gauge<Integer> g1 = new Gauge<Integer>() {

        @Override
        public Integer getValue() {
            return 4;
        }
    };
    Histogram h1 = new TestingHistogram();
    Meter m1 = new Meter() {

        @Override
        public void markEvent() {
        }

        @Override
        public void markEvent(long n) {
        }

        @Override
        public double getRate() {
            return 5;
        }

        @Override
        public long getCount() {
            return 10;
        }
    };
    counters.put(c1, new Tuple2<QueryScopeInfo, String>(new QueryScopeInfo.JobManagerQueryScopeInfo("A"), "c1"));
    counters.put(c2, new Tuple2<QueryScopeInfo, String>(new QueryScopeInfo.TaskManagerQueryScopeInfo("tmid", "B"), "c2"));
    meters.put(m1, new Tuple2<QueryScopeInfo, String>(new QueryScopeInfo.JobQueryScopeInfo("jid", "C"), "c3"));
    gauges.put(g1, new Tuple2<QueryScopeInfo, String>(new QueryScopeInfo.TaskQueryScopeInfo("jid", "vid", 2, "D"), "g1"));
    histograms.put(h1, new Tuple2<QueryScopeInfo, String>(new QueryScopeInfo.OperatorQueryScopeInfo("jid", "vid", 2, "opname", "E"), "h1"));
    MetricDumpSerialization.MetricSerializationResult serialized = serializer.serialize(counters, gauges, histograms, meters);
    List<MetricDump> deserialized = deserializer.deserialize(serialized);
    // ===== Counters ==============================================================================================
    assertEquals(5, deserialized.size());
    for (MetricDump metric : deserialized) {
        switch(metric.getCategory()) {
            case METRIC_CATEGORY_COUNTER:
                MetricDump.CounterDump counterDump = (MetricDump.CounterDump) metric;
                switch((byte) counterDump.count) {
                    case 1:
                        assertTrue(counterDump.scopeInfo instanceof QueryScopeInfo.JobManagerQueryScopeInfo);
                        assertEquals("A", counterDump.scopeInfo.scope);
                        assertEquals("c1", counterDump.name);
                        counters.remove(c1);
                        break;
                    case 2:
                        assertTrue(counterDump.scopeInfo instanceof QueryScopeInfo.TaskManagerQueryScopeInfo);
                        assertEquals("B", counterDump.scopeInfo.scope);
                        assertEquals("c2", counterDump.name);
                        assertEquals("tmid", ((QueryScopeInfo.TaskManagerQueryScopeInfo) counterDump.scopeInfo).taskManagerID);
                        counters.remove(c2);
                        break;
                    default:
                        fail();
                }
                break;
            case METRIC_CATEGORY_GAUGE:
                MetricDump.GaugeDump gaugeDump = (MetricDump.GaugeDump) metric;
                assertEquals("4", gaugeDump.value);
                assertEquals("g1", gaugeDump.name);
                assertTrue(gaugeDump.scopeInfo instanceof QueryScopeInfo.TaskQueryScopeInfo);
                QueryScopeInfo.TaskQueryScopeInfo taskInfo = (QueryScopeInfo.TaskQueryScopeInfo) gaugeDump.scopeInfo;
                assertEquals("D", taskInfo.scope);
                assertEquals("jid", taskInfo.jobID);
                assertEquals("vid", taskInfo.vertexID);
                assertEquals(2, taskInfo.subtaskIndex);
                gauges.remove(g1);
                break;
            case METRIC_CATEGORY_HISTOGRAM:
                MetricDump.HistogramDump histogramDump = (MetricDump.HistogramDump) metric;
                assertEquals("h1", histogramDump.name);
                assertEquals(0.5, histogramDump.median, 0.1);
                assertEquals(0.75, histogramDump.p75, 0.1);
                assertEquals(0.90, histogramDump.p90, 0.1);
                assertEquals(0.95, histogramDump.p95, 0.1);
                assertEquals(0.98, histogramDump.p98, 0.1);
                assertEquals(0.99, histogramDump.p99, 0.1);
                assertEquals(0.999, histogramDump.p999, 0.1);
                assertEquals(4, histogramDump.mean, 0.1);
                assertEquals(5, histogramDump.stddev, 0.1);
                assertEquals(6, histogramDump.max);
                assertEquals(7, histogramDump.min);
                assertTrue(histogramDump.scopeInfo instanceof QueryScopeInfo.OperatorQueryScopeInfo);
                QueryScopeInfo.OperatorQueryScopeInfo opInfo = (QueryScopeInfo.OperatorQueryScopeInfo) histogramDump.scopeInfo;
                assertEquals("E", opInfo.scope);
                assertEquals("jid", opInfo.jobID);
                assertEquals("vid", opInfo.vertexID);
                assertEquals(2, opInfo.subtaskIndex);
                assertEquals("opname", opInfo.operatorName);
                histograms.remove(h1);
                break;
            case METRIC_CATEGORY_METER:
                MetricDump.MeterDump meterDump = (MetricDump.MeterDump) metric;
                assertEquals(5.0, meterDump.rate, 0.1);
                assertTrue(meterDump.scopeInfo instanceof QueryScopeInfo.JobQueryScopeInfo);
                assertEquals("C", meterDump.scopeInfo.scope);
                assertEquals("c3", meterDump.name);
                assertEquals("jid", ((QueryScopeInfo.JobQueryScopeInfo) meterDump.scopeInfo).jobID);
                break;
            default:
                fail();
        }
    }
    assertTrue(counters.isEmpty());
    assertTrue(gauges.isEmpty());
    assertTrue(histograms.isEmpty());
}
Also used : TestingHistogram(org.apache.flink.runtime.metrics.util.TestingHistogram) Histogram(org.apache.flink.metrics.Histogram) HashMap(java.util.HashMap) Meter(org.apache.flink.metrics.Meter) Gauge(org.apache.flink.metrics.Gauge) SimpleCounter(org.apache.flink.metrics.SimpleCounter) Counter(org.apache.flink.metrics.Counter) SimpleCounter(org.apache.flink.metrics.SimpleCounter) Tuple2(org.apache.flink.api.java.tuple.Tuple2) TestingHistogram(org.apache.flink.runtime.metrics.util.TestingHistogram) Test(org.junit.Test)

Example 10 with Gauge

use of org.apache.flink.metrics.Gauge in project flink by apache.

the class ExecutionGraphMetricsTest method testExecutionGraphRestartTimeMetric.

/**
	 * This test tests that the restarting time metric correctly displays restarting times.
	 */
@Test
public void testExecutionGraphRestartTimeMetric() throws JobException, IOException, InterruptedException {
    final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
    try {
        // setup execution graph with mocked scheduling logic
        int parallelism = 1;
        JobVertex jobVertex = new JobVertex("TestVertex");
        jobVertex.setParallelism(parallelism);
        jobVertex.setInvokableClass(NoOpInvokable.class);
        JobGraph jobGraph = new JobGraph("Test Job", jobVertex);
        Configuration config = new Configuration();
        config.setString(ConfigConstants.METRICS_REPORTERS_LIST, "test");
        config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + "test." + ConfigConstants.METRICS_REPORTER_CLASS_SUFFIX, TestingReporter.class.getName());
        Configuration jobConfig = new Configuration();
        Time timeout = Time.seconds(10L);
        MetricRegistry metricRegistry = new MetricRegistry(MetricRegistryConfiguration.fromConfiguration(config));
        assertTrue(metricRegistry.getReporters().size() == 1);
        MetricReporter reporter = metricRegistry.getReporters().get(0);
        assertTrue(reporter instanceof TestingReporter);
        TestingReporter testingReporter = (TestingReporter) reporter;
        MetricGroup metricGroup = new JobManagerMetricGroup(metricRegistry, "localhost");
        Scheduler scheduler = mock(Scheduler.class);
        ResourceID taskManagerId = ResourceID.generate();
        TaskManagerLocation taskManagerLocation = mock(TaskManagerLocation.class);
        when(taskManagerLocation.getResourceID()).thenReturn(taskManagerId);
        when(taskManagerLocation.getHostname()).thenReturn("localhost");
        TaskManagerGateway taskManagerGateway = mock(TaskManagerGateway.class);
        Instance instance = mock(Instance.class);
        when(instance.getTaskManagerLocation()).thenReturn(taskManagerLocation);
        when(instance.getTaskManagerID()).thenReturn(taskManagerId);
        when(instance.getTaskManagerGateway()).thenReturn(taskManagerGateway);
        Slot rootSlot = mock(Slot.class);
        AllocatedSlot mockAllocatedSlot = mock(AllocatedSlot.class);
        when(mockAllocatedSlot.getSlotAllocationId()).thenReturn(new AllocationID());
        SimpleSlot simpleSlot = mock(SimpleSlot.class);
        when(simpleSlot.isAlive()).thenReturn(true);
        when(simpleSlot.getTaskManagerLocation()).thenReturn(taskManagerLocation);
        when(simpleSlot.getTaskManagerID()).thenReturn(taskManagerId);
        when(simpleSlot.getTaskManagerGateway()).thenReturn(taskManagerGateway);
        when(simpleSlot.setExecutedVertex(Matchers.any(Execution.class))).thenReturn(true);
        when(simpleSlot.getRoot()).thenReturn(rootSlot);
        when(simpleSlot.getAllocatedSlot()).thenReturn(mockAllocatedSlot);
        FlinkCompletableFuture<SimpleSlot> future = new FlinkCompletableFuture<>();
        future.complete(simpleSlot);
        when(scheduler.allocateSlot(any(ScheduledUnit.class), anyBoolean())).thenReturn(future);
        when(rootSlot.getSlotNumber()).thenReturn(0);
        when(taskManagerGateway.submitTask(any(TaskDeploymentDescriptor.class), any(Time.class))).thenReturn(FlinkCompletableFuture.completed(Acknowledge.get()));
        TestingRestartStrategy testingRestartStrategy = new TestingRestartStrategy();
        ExecutionGraph executionGraph = new ExecutionGraph(executor, executor, jobGraph.getJobID(), jobGraph.getName(), jobConfig, new SerializedValue<ExecutionConfig>(null), timeout, testingRestartStrategy, Collections.<BlobKey>emptyList(), Collections.<URL>emptyList(), scheduler, getClass().getClassLoader(), metricGroup);
        // get restarting time metric
        Metric metric = testingReporter.getMetric(ExecutionGraph.RESTARTING_TIME_METRIC_NAME);
        assertNotNull(metric);
        assertTrue(metric instanceof Gauge);
        @SuppressWarnings("unchecked") Gauge<Long> restartingTime = (Gauge<Long>) metric;
        // check that the restarting time is 0 since it's the initial start
        assertTrue(0L == restartingTime.getValue());
        executionGraph.attachJobGraph(jobGraph.getVerticesSortedTopologicallyFromSources());
        // start execution
        executionGraph.scheduleForExecution();
        assertTrue(0L == restartingTime.getValue());
        List<ExecutionAttemptID> executionIDs = new ArrayList<>();
        for (ExecutionVertex executionVertex : executionGraph.getAllExecutionVertices()) {
            executionIDs.add(executionVertex.getCurrentExecutionAttempt().getAttemptId());
        }
        // tell execution graph that the tasks are in state running --> job status switches to state running
        for (ExecutionAttemptID executionID : executionIDs) {
            executionGraph.updateState(new TaskExecutionState(jobGraph.getJobID(), executionID, ExecutionState.RUNNING));
        }
        assertEquals(JobStatus.RUNNING, executionGraph.getState());
        assertTrue(0L == restartingTime.getValue());
        // fail the job so that it goes into state restarting
        for (ExecutionAttemptID executionID : executionIDs) {
            executionGraph.updateState(new TaskExecutionState(jobGraph.getJobID(), executionID, ExecutionState.FAILED, new Exception()));
        }
        assertEquals(JobStatus.RESTARTING, executionGraph.getState());
        long firstRestartingTimestamp = executionGraph.getStatusTimestamp(JobStatus.RESTARTING);
        // wait some time so that the restarting time gauge shows a value different from 0
        Thread.sleep(50);
        long previousRestartingTime = restartingTime.getValue();
        // check that the restarting time is monotonically increasing
        for (int i = 0; i < 10; i++) {
            long currentRestartingTime = restartingTime.getValue();
            assertTrue(currentRestartingTime >= previousRestartingTime);
            previousRestartingTime = currentRestartingTime;
        }
        // check that we have measured some restarting time
        assertTrue(previousRestartingTime > 0);
        // restart job
        testingRestartStrategy.restartExecutionGraph();
        executionIDs.clear();
        for (ExecutionVertex executionVertex : executionGraph.getAllExecutionVertices()) {
            executionIDs.add(executionVertex.getCurrentExecutionAttempt().getAttemptId());
        }
        for (ExecutionAttemptID executionID : executionIDs) {
            executionGraph.updateState(new TaskExecutionState(jobGraph.getJobID(), executionID, ExecutionState.RUNNING));
        }
        assertEquals(JobStatus.RUNNING, executionGraph.getState());
        assertTrue(firstRestartingTimestamp != 0);
        previousRestartingTime = restartingTime.getValue();
        // check that the restarting time does not increase after we've reached the running state
        for (int i = 0; i < 10; i++) {
            long currentRestartingTime = restartingTime.getValue();
            assertTrue(currentRestartingTime == previousRestartingTime);
            previousRestartingTime = currentRestartingTime;
        }
        // fail job again
        for (ExecutionAttemptID executionID : executionIDs) {
            executionGraph.updateState(new TaskExecutionState(jobGraph.getJobID(), executionID, ExecutionState.FAILED, new Exception()));
        }
        assertEquals(JobStatus.RESTARTING, executionGraph.getState());
        long secondRestartingTimestamp = executionGraph.getStatusTimestamp(JobStatus.RESTARTING);
        assertTrue(firstRestartingTimestamp != secondRestartingTimestamp);
        Thread.sleep(50);
        previousRestartingTime = restartingTime.getValue();
        // check that the restarting time is increasing again
        for (int i = 0; i < 10; i++) {
            long currentRestartingTime = restartingTime.getValue();
            assertTrue(currentRestartingTime >= previousRestartingTime);
            previousRestartingTime = currentRestartingTime;
        }
        assertTrue(previousRestartingTime > 0);
        // now lets fail the job while it is in restarting and see whether the restarting time then stops to increase
        // for this to work, we have to use a SuppressRestartException
        executionGraph.fail(new SuppressRestartsException(new Exception()));
        assertEquals(JobStatus.FAILED, executionGraph.getState());
        previousRestartingTime = restartingTime.getValue();
        for (int i = 0; i < 10; i++) {
            long currentRestartingTime = restartingTime.getValue();
            assertTrue(currentRestartingTime == previousRestartingTime);
            previousRestartingTime = currentRestartingTime;
        }
    } finally {
        executor.shutdownNow();
    }
}
Also used : JobManagerMetricGroup(org.apache.flink.runtime.metrics.groups.JobManagerMetricGroup) MetricRegistryConfiguration(org.apache.flink.runtime.metrics.MetricRegistryConfiguration) Configuration(org.apache.flink.configuration.Configuration) Instance(org.apache.flink.runtime.instance.Instance) Scheduler(org.apache.flink.runtime.jobmanager.scheduler.Scheduler) MetricGroup(org.apache.flink.metrics.MetricGroup) JobManagerMetricGroup(org.apache.flink.runtime.metrics.groups.JobManagerMetricGroup) TaskManagerGateway(org.apache.flink.runtime.jobmanager.slots.TaskManagerGateway) ArrayList(java.util.ArrayList) Time(org.apache.flink.api.common.time.Time) ExecutionConfig(org.apache.flink.api.common.ExecutionConfig) SimpleSlot(org.apache.flink.runtime.instance.SimpleSlot) FlinkCompletableFuture(org.apache.flink.runtime.concurrent.impl.FlinkCompletableFuture) Gauge(org.apache.flink.metrics.Gauge) SuppressRestartsException(org.apache.flink.runtime.execution.SuppressRestartsException) ResourceID(org.apache.flink.runtime.clusterframework.types.ResourceID) TaskDeploymentDescriptor(org.apache.flink.runtime.deployment.TaskDeploymentDescriptor) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) AllocatedSlot(org.apache.flink.runtime.jobmanager.slots.AllocatedSlot) TaskManagerLocation(org.apache.flink.runtime.taskmanager.TaskManagerLocation) MetricRegistry(org.apache.flink.runtime.metrics.MetricRegistry) AllocationID(org.apache.flink.runtime.clusterframework.types.AllocationID) ScheduledUnit(org.apache.flink.runtime.jobmanager.scheduler.ScheduledUnit) MetricReporter(org.apache.flink.metrics.reporter.MetricReporter) TaskExecutionState(org.apache.flink.runtime.taskmanager.TaskExecutionState) SuppressRestartsException(org.apache.flink.runtime.execution.SuppressRestartsException) JobException(org.apache.flink.runtime.JobException) IOException(java.io.IOException) JobGraph(org.apache.flink.runtime.jobgraph.JobGraph) JobVertex(org.apache.flink.runtime.jobgraph.JobVertex) SimpleSlot(org.apache.flink.runtime.instance.SimpleSlot) Slot(org.apache.flink.runtime.instance.Slot) AllocatedSlot(org.apache.flink.runtime.jobmanager.slots.AllocatedSlot) Metric(org.apache.flink.metrics.Metric) Test(org.junit.Test)

Aggregations

Gauge (org.apache.flink.metrics.Gauge)17 Counter (org.apache.flink.metrics.Counter)7 Histogram (org.apache.flink.metrics.Histogram)7 Meter (org.apache.flink.metrics.Meter)7 Test (org.junit.Test)7 MetricGroup (org.apache.flink.metrics.MetricGroup)5 ObjectName (javax.management.ObjectName)4 Configuration (org.apache.flink.configuration.Configuration)4 SimpleCounter (org.apache.flink.metrics.SimpleCounter)4 MetricRegistry (org.apache.flink.runtime.metrics.MetricRegistry)4 MetricRegistryConfiguration (org.apache.flink.runtime.metrics.MetricRegistryConfiguration)4 TaskManagerMetricGroup (org.apache.flink.runtime.metrics.groups.TaskManagerMetricGroup)4 MalformedObjectNameException (javax.management.MalformedObjectNameException)3 Tuple2 (org.apache.flink.api.java.tuple.Tuple2)3 MetricReporter (org.apache.flink.metrics.reporter.MetricReporter)3 IOException (java.io.IOException)2 HashMap (java.util.HashMap)2 MBeanServer (javax.management.MBeanServer)2 Metric (org.apache.flink.metrics.Metric)2 TestingHistogram (org.apache.flink.runtime.metrics.util.TestingHistogram)2