@Override
  public String toString() {
    return MoreObjects.toStringHelper(this).add("info", metricsInfo).add("tags", tags())
      .add("metrics", metrics()).toString();
  }
Sample all the mutable metrics and put the snapshot in the builder
@param builder to contain the metrics snapshot
@param all     get all the metrics even if the values are not changed.
hbase-hadoop-compat/src/main/java/org/apache/hadoop/metrics2/lib/DynamicMetricsRegistry.java