public Rate getOrCreateRate(String name, MetricLevel metricLevel, String... tags) {
    if (invalid(metricLevel, name, tags)) {
      return DoNothingMetricManager.DO_NOTHING_RATE;
    }
    MetricInfo metricInfo = new MetricInfo(MetricType.RATE, name, tags);
    IMetric metric =
        metrics.computeIfAbsent(
            metricInfo,
            key -> {
              Rate rate = createRate();
              nameToMetaInfo.put(name, metricInfo.getMetaInfo());
              notifyReporterOnAdd(rate, metricInfo);
              return rate;
            });
    if (metric instanceof Rate) {
      return (Rate) metric;
    }
    throw new IllegalArgumentException(metricInfo + ALREADY_EXISTS);
  }
Get rate. return if exists, create if not.

@param name the name of name
@param metricLevel the level of name
@param tags string pairs, like sg="ln" will be "sg", "ln"
@throws IllegalArgumentException when there has different type metric with same name
iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java