public static void recordTime(final String name, final long duration) {
        recordTime(name, null, duration);
    }
Record time by duration.

@param name name
@param duration duration
shenyu-plugin/shenyu-plugin-metrics/src/main/java/org/apache/shenyu/plugin/metrics/reporter/MetricsReporter.java