public IntValues getValues(final BatchMetricConditions metrics, final Duration duration) throws IOException {
        IntValues values = new IntValues();
        if (metrics.getIds().size() == 0) {
            KVInt kv = new KVInt();

            MetricsCondition condition = new MetricsCondition();
            condition.setName(metrics.getName());
            condition.setEntity(new MockEntity(null));

            kv.setValue(query.readMetricsValue(condition, duration).join());
            values.addKVInt(kv);
        } else {
            List<KVInt> ints = metrics.getIds().parallelStream().map(id -> {
                MetricsCondition condition = new MetricsCondition();
                condition.setName(metrics.getName());
                condition.setEntity(new MockEntity(id));
                KVInt kv = new KVInt();
                kv.setId(id);
                kv.setValue(query.readMetricsValue(condition, duration).join());
                return kv;
            }).collect(Collectors.toList());
            ints.forEach(v -> values.addKVInt(v));

        }

        return values;
    }
@since 8.0.0 This query is replaced by {@link MetricsQuery}
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/MetricQuery.java