public static void recordTime(final String name, final String[] labelValues, final long duration) {
        Optional.ofNullable(metricsRegister).ifPresent(register -> register.recordTime(name, labelValues, duration));
    }
@Test
    public void testRecordTime() {
        String name1 = "requests_latency_histogram_millis1";
        String name2 = "requests_latency_histogram_millis2";
        String[] labelNames = new String[] {"name"};
        MetricsReporter.registerHistogram(name1, labelNames, "the shenyu proxy executor latency millis");
        MetricsReporter.registerHistogram(name2, "the shenyu proxy executor latency millis");
        MetricsReporter.recordTime(name1, labelNames, 1000);
        Map<String, Histogram> histogramMap1 = (Map<String, Histogram>) ReflectUtils.getFieldValue(metricsRegister, "HISTOGRAM_MAP");
        Histogram histogram1 = histogramMap1.get(name1);
        Assertions.assertEquals(histogram1.labels(labelNames).get().sum, 1000.0);
        MetricsReporter.recordTime(name2, 1000);
        Map<String, Histogram> histogramMap2 = (Map<String, Histogram>) ReflectUtils.getFieldValue(metricsRegister, "HISTOGRAM_MAP");
        Histogram histogram2 = histogramMap2.get(name2);
        Assertions.assertEquals(histogram2.labels().get().sum, 1000.0);
    }