public boolean hasSameKey(String... tags) {
      if (tags.length != tagNames.size() * 2) {
        return false;
      }
      for (int i = 0; i < tags.length; i += PAIR_SIZE) {
        if (!tagNames.contains(tags[i])) {
          return false;
        }
      }
      return true;
    }
Check whether the keys of tags are same.
iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MetricInfo.java