public static MetricsProtocol fromString(final String str) {
    for (final MetricsProtocol mode : MetricsProtocol.values()) {
      if (mode.name().equalsIgnoreCase(str)) {
        return mode;
      }
    }
    return null;
  }
Create Metrics Protocol from String representation.

@param str the string representation of message protocol
@return the metrics protocol
metrics/core/src/main/java/org/hyperledger/besu/metrics/MetricsProtocol.java