public static void bind() {
    MetricService metricService = MetricService.getInstance();
    metricService.addMetricSet(new UpTimeMetrics());
    metricService.addMetricSet(new JvmMetrics());
    metricService.addMetricSet(ThreadPoolMetrics.getInstance());
    metricService.addMetricSet(new LogbackMetrics());
    metricService.addMetricSet(FileMetrics.getInstance());
    metricService.addMetricSet(CompactionMetrics.getInstance());
    metricService.addMetricSet(new ProcessMetrics());
    metricService.addMetricSet(new DiskMetrics(IoTDBConstant.DN_ROLE));
    metricService.addMetricSet(new NetMetrics(IoTDBConstant.DN_ROLE));
    metricService.addMetricSet(ClientManagerMetrics.getInstance());
    initCpuMetrics(metricService);
    initSystemMetrics(metricService);
    metricService.addMetricSet(WritingMetrics.getInstance());

    // bind query related metrics
    metricService.addMetricSet(QueryPlanCostMetricSet.getInstance());
    metricService.addMetricSet(SeriesScanCostMetricSet.getInstance());
    metricService.addMetricSet(QueryExecutionMetricSet.getInstance());
    metricService.addMetricSet(QueryResourceMetricSet.getInstance());
    metricService.addMetricSet(DataExchangeCostMetricSet.getInstance());
    metricService.addMetricSet(DataExchangeCountMetricSet.getInstance());
    metricService.addMetricSet(DriverSchedulerMetricSet.getInstance());
    metricService.addMetricSet(QueryRelatedResourceMetricSet.getInstance());

    // bind performance overview related metrics
    metricService.addMetricSet(PerformanceOverviewMetrics.getInstance());

    // bind gc metrics
    metricService.addMetricSet(JvmGcMonitorMetrics.getInstance());

    // bind pipe related metrics
    metricService.addMetricSet(PipeDataNodeMetrics.getInstance());

    // bind load tsfile memory related metrics
    metricService.addMetricSet(LoadTsFileMemMetricSet.getInstance());

    // bind subscription related metrics
    metricService.addMetricSet(SubscriptionMetrics.getInstance());

    // bind load related metrics
    metricService.addMetricSet(LoadTsFileCostMetricsSet.getInstance());
    metricService.addMetricSet(ActiveLoadingFilesNumberMetricsSet.getInstance());
    metricService.addMetricSet(ActiveLoadingFilesSizeMetricsSet.getInstance());

    // bind memory related metrics
    metricService.addMetricSet(GlobalMemoryMetrics.getInstance());
  }
Bind predefined metric sets into DataNode.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java