public Timer getOrCreateTimer(String name, MetricLevel metricLevel, String... tags) {
    if (invalid(metricLevel, name, tags)) {
      return DoNothingMetricManager.DO_NOTHING_TIMER;
    }
    MetricInfo metricInfo = new MetricInfo(MetricType.TIMER, name, tags);
    IMetric metric =
        metrics.computeIfAbsent(
            metricInfo,
            key -> {
              Timer timer = createTimer();
              nameToMetaInfo.put(name, metricInfo.getMetaInfo());
              notifyReporterOnAdd(timer, metricInfo);
              return timer;
            });
    if (metric instanceof Timer) {
      return (Timer) metric;
    }
    throw new IllegalArgumentException(metricInfo + ALREADY_EXISTS);
  }
Get timer. 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