public Map<MetricInfo, IMetric> getMetricsByType(MetricType metricType) {
    Map<MetricInfo, IMetric> result = new HashMap<>();
    for (Map.Entry<MetricInfo, IMetric> entry : metrics.entrySet()) {
      if (entry.getKey().getMetaInfo().getType() == metricType) {
        result.put(entry.getKey(), entry.getValue());
      }
    }
    return result;
  }
Get metrics by type.

@return [name, [tags...]] -> metric
iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java