private void writeToTableAndCsv(TabularResultModel metricsTable, String type, String metricName,
      String metricValue, StringBuilder csvBuilder) {
    metricsTable.accumulate(CliStrings.SHOW_METRICS__TYPE__HEADER, type);
    metricsTable.accumulate(CliStrings.SHOW_METRICS__METRIC__HEADER, metricName);
    metricsTable.accumulate(CliStrings.SHOW_METRICS__VALUE__HEADER, metricValue);

    writeToCsvIfNecessary(type, metricName, String.valueOf(metricValue), csvBuilder);
  }
Gets the metrics of region on a given member

@return ResultData with required Region statistics or ErrorResultData if Region MBean is not
        found to gather metrics
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/ShowMetricsCommand.java