public void addMetricValue(String name, RuntimeUnit unit, long value)
    {
        metrics.computeIfAbsent(name, k -> new RuntimeMetric(name, unit)).addValue(value);
    }
@Test
    public void testAddMetricValue()
    {
        RuntimeStats stats = new RuntimeStats();
        stats.addMetricValue(TEST_METRIC_NAME_1, NONE, 2);
        stats.addMetricValue(TEST_METRIC_NAME_1, NONE, 3);
        stats.addMetricValue(TEST_METRIC_NAME_1, NONE, 5);
        stats.addMetricValue(TEST_METRIC_NAME_NANO_1, NANO, 7);

        assertRuntimeMetricEquals(
                stats.getMetric(TEST_METRIC_NAME_1),
                new RuntimeMetric(TEST_METRIC_NAME_1, NONE, 10, 3, 5, 2));
        assertRuntimeMetricEquals(
                stats.getMetric(TEST_METRIC_NAME_NANO_1),
                new RuntimeMetric(TEST_METRIC_NAME_NANO_1, NANO, 7, 1, 7, 7));

        stats.reset();
        assertEquals(stats.getMetrics().size(), 0);
    }