geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShowMetricsCommand.java
private void writeToTableAndCsv(TabularResultData metricsTable, String metricName,
      String metricValue, StringBuilder csvBuilder) {
    metricsTable.accumulate(CliStrings.SHOW_METRICS__TYPE__HEADER, "");
    metricsTable.accumulate(CliStrings.SHOW_METRICS__METRIC__HEADER, metricName);
    metricsTable.accumulate(CliStrings.SHOW_METRICS__VALUE__HEADER, metricValue);

    if (csvBuilder != null) {
      csvBuilder.append("");
      csvBuilder.append(',');
      csvBuilder.append(metricName);
      csvBuilder.append(',');
      csvBuilder.append(metricValue);
      csvBuilder.append('\n');
    }
  }
/**
   * Writes to a TabularResultData and also appends a CSV string to a String builder
   */
Writes to a TabularResultData and also appends a CSV string to a String builder
Writes to a TabularResultData and also appends a CSV string to a String builder
private void writeToTableAndCsv(TabularResultData metricsTable, String metricName,
      String metricValue, StringBuilder csvBuilder) {
    metricsTable.accumulate(CliStrings.SHOW_METRICS__TYPE__HEADER, "");
    metricsTable.accumulate(CliStrings.SHOW_METRICS__METRIC__HEADER, metricName);
    metricsTable.accumulate(CliStrings.SHOW_METRICS__VALUE__HEADER, metricValue);
    if (csvBuilder != null) {
      csvBuilder.append("");
      csvBuilder.append(',');
      csvBuilder.append(metricName);
      csvBuilder.append(',');
      csvBuilder.append(metricValue);
      csvBuilder.append('\n');
    }
  }
private void writeToTableAndCsv ( TabularResultData metricsTable , String metricName , String metricValue , StringBuilder csvBuilder ) { metricsTable . accumulate ( CliStrings . SHOW_METRICS__TYPE__HEADER , "" ) ; metricsTable . accumulate ( CliStrings . SHOW_METRICS__METRIC__HEADER , metricName ) ; metricsTable . accumulate ( CliStrings . SHOW_METRICS__VALUE__HEADER , metricValue ) ; if ( csvBuilder != null ) { csvBuilder . append ( "" ) ; csvBuilder . append ( ',' ) ; csvBuilder . append ( metricName ) ; csvBuilder . append ( ',' ) ; csvBuilder . append ( metricValue ) ; csvBuilder . append ( '\n' ) ; } }
Writes to a TabularResultData and also appends a CSV string to a String builder
Writes to a TabularResultData and also appends a CSV string to a String builder