public void writeMetricToIoTDB(Map<MetricInfo, IMetric> metricMap) {
    Map<String, Map<String, Object>> values = new HashMap<>();
    for (Map.Entry<MetricInfo, IMetric> metricEntry : metricMap.entrySet()) {
      String prefix = IoTDBMetricsUtils.generatePath(metricEntry.getKey());
      IMetric metric = metricEntry.getValue();
      if (!(metric instanceof DoNothingMetric)) {
        Map<String, Object> value = new HashMap<>();
        metric.constructValueMap(value);
        values.put(prefix, value);
      }
    }
    writeMetricsToIoTDB(values, System.currentTimeMillis());
  }
Write metrics into IoTDB.

@param metricMap metricInfo -> IMetric
iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/iotdb/IoTDBReporter.java