1 18 package org.apache.activemq.tool.reports; 19 20 import org.apache.activemq.tool.reports.plugins.ReportPlugin; 21 import org.apache.activemq.tool.reports.plugins.ThroughputReportPlugin; 22 import org.apache.activemq.tool.reports.plugins.CpuReportPlugin; 23 24 import java.util.Map ; 25 26 public abstract class AbstractPerfReportWriter implements PerformanceReportWriter { 27 28 public static final int REPORT_PLUGIN_THROUGHPUT = 0; 29 public static final int REPORT_PLUGIN_CPU = 1; 30 31 protected ReportPlugin[] plugins = new ReportPlugin[] { 32 new ThroughputReportPlugin(), 33 new CpuReportPlugin() 34 }; 35 36 protected void handleCsvData(int pluginType, String csvData) { 37 plugins[pluginType].handleCsvData(csvData); 38 } 39 40 protected Map getSummary(int pluginType) { 41 return plugins[pluginType].getSummary(); 42 } 43 } 44 | Popular Tags |