private void writeToTableAndCsv(TabularResultModel metricsTable, String type, String metricName,
      String[] metricValue, StringBuilder csvBuilder) {
    if (ArrayUtils.isEmpty(metricValue)) {
      return;
    }

    for (int i = 0; i < metricValue.length; i++) {
      if (i == 0) {
        writeToTableAndCsv(metricsTable, type, metricName, metricValue[i], csvBuilder);
      } else {
        writeToTableAndCsv(metricsTable, "", "", metricValue[i], 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