code: private void printMetric(String metricName, String nickName, boolean valueIsBytes) {
      if (mMetricsMap == null || !mMetricsMap.containsKey(metricName)) {
        return;
      }
      MetricValue metricValue = mMetricsMap.get(metricName);
      String formattedValue = valueIsBytes ? FormatUtils.getSizeFromBytes(metricValue.getLongValue())
          : getFormattedValue(metricValue);
      mPrintStream.println(INDENT + String.format(mInfoFormat,
          nickName == null ? metricName : nickName, formattedValue));
      mMetricsMap.remove(metricName);
    }
docs: Prints the metrics information.
  
  @param metricName the metric name to get a metric value
  @param nickName the metric name to print
  @param valueIsBytes whether the metric value is bytes