private MetricsValues invokeReadMetricsValues(MetricsCondition condition, Duration duration) throws IOException {
        if (!condition.senseScope() || !condition.getEntity().isValid()) {
            return new MetricsValues();
        }
        return getMetricQueryDAO().readMetricsValuesDebuggable(
            condition, ValueColumnMetadata.INSTANCE.getValueCName(condition.getName()), duration);
    }
Read metrics average value in the duration of required metrics
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/MetricsQueryService.java