use of org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet in project camunda-bpm-platform by camunda.
the class ActivityCountAggregator method processResults.
protected void processResults(PerfTestResults results, TabularResultSet tabularResultSet) {
PerfTestConfiguration configuration = results.getConfiguration();
List<String> watchActivities = configuration.getWatchActivities();
for (PerfTestResult passResult : results.getPassResults()) {
String passTitle = getPassTitle(results.getTestName(), configuration, passResult);
TabularResultSet result = processPassResult(watchActivities, passResult);
htmlBuilder.addSection(passTitle, result);
}
}
use of org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet in project camunda-bpm-platform by camunda.
the class SqlStatementCountAggregator method createAggregatedResultsInstance.
protected TabularResultSet createAggregatedResultsInstance() {
TabularResultSet tabularResultSet = new TabularResultSet();
List<String> resultColumnNames = tabularResultSet.getResultColumnNames();
resultColumnNames.add(TEST_NAME);
resultColumnNames.add(INSERTS);
resultColumnNames.add(DELETES);
resultColumnNames.add(UPDATES);
resultColumnNames.add(SELECTS);
return tabularResultSet;
}
use of org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet in project camunda-bpm-platform by camunda.
the class BenchmarkReport method main.
public static void main(String[] args) {
final String resultsFolder = "target" + File.separatorChar + "results";
final String reportsFolder = "target" + File.separatorChar + "reports";
String longTermBenchmarkResultFilename = System.getProperty("longTermBenchmarkResultFile");
if (longTermBenchmarkResultFilename != null) {
File longTermBenchmarkResultFile = new File(longTermBenchmarkResultFilename);
longTermBenchmarkResultFile.getParentFile().mkdirs();
if (longTermBenchmarkResultFile.exists()) {
// Do nothing, append current results later
} else {
FileUtil.appendStringToFile("name;" + "number of runs;" + "database;" + "history level;" + "starttime;" + "platform;" + "number of threads;" + "duration;" + "throughput", longTermBenchmarkResultFilename);
}
TabularResultSet longTermResultTable = new BenchmarkLongtermAggregator(resultsFolder).execute();
FileUtil.appendStringToFile(CsvUtil.resultSetAsCsv(longTermResultTable), longTermBenchmarkResultFilename);
}
writeReport(resultsFolder, reportsFolder, "benchmark", new BenchmarkAggregator(resultsFolder), "Benchmark Duration Report");
}
use of org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet in project camunda-bpm-platform by camunda.
the class BenchmarkReport method writeReport.
private static void writeReport(String resultsFolder, String reportsFolder, String benchmarkName, TabularResultAggregator aggregator, String reportDescription) {
final String htmlReportFilename = reportsFolder + File.separatorChar + benchmarkName + "-report.html";
final String jsonReportFilename = benchmarkName + "-report.json";
final String jsonReportPath = reportsFolder + File.separatorChar + jsonReportFilename;
final String csvReportFilename = benchmarkName + "-report.csv";
final String csvReportPath = reportsFolder + File.separatorChar + csvReportFilename;
// make sure reports folder exists
File reportsFolderFile = new File(reportsFolder);
if (!reportsFolderFile.exists()) {
reportsFolderFile.mkdir();
}
TabularResultSet aggregatedResults = aggregator.execute();
// write Json report
JsonUtil.writeObjectToFile(jsonReportPath, aggregatedResults);
// format HTML report
HtmlReportBuilder reportWriter = new HtmlReportBuilder(aggregatedResults).name(reportDescription).resultDetailsFolder(".." + File.separatorChar + "results" + File.separatorChar).createImageLinks(true).jsonSource(jsonReportFilename).csvSource(csvReportFilename);
String report = reportWriter.execute();
FileUtil.writeStringToFile(report, htmlReportFilename);
// write CSV report
CsvUtil.saveResultSetToFile(csvReportPath, aggregatedResults);
}
use of org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet in project camunda-bpm-platform by camunda.
the class ReportUtil method writeReport.
public static void writeReport(String resultsFolder, String reportsFolder, String benchmarkName, TabularResultAggregator aggregator, String reportDescription) {
final String htmlReportFilename = reportsFolder + File.separatorChar + benchmarkName + "-report.html";
final String jsonReportFilename = benchmarkName + "-report.json";
final String jsonReportPath = reportsFolder + File.separatorChar + jsonReportFilename;
final String csvReportFilename = benchmarkName + "-report.csv";
final String csvReportPath = reportsFolder + File.separatorChar + csvReportFilename;
// make sure reports folder exists
File reportsFolderFile = new File(reportsFolder);
if (!reportsFolderFile.exists()) {
reportsFolderFile.mkdir();
}
TabularResultSet aggregatedResults = aggregator.execute();
// write Json report
JsonUtil.writeObjectToFile(jsonReportPath, aggregatedResults);
// format HTML report
HtmlReportBuilder reportWriter = new HtmlReportBuilder(aggregatedResults).name(reportDescription).resultDetailsFolder(".." + File.separatorChar + "results" + File.separatorChar).createImageLinks(true).jsonSource(jsonReportFilename).csvSource(csvReportFilename);
String report = reportWriter.execute();
FileUtil.writeStringToFile(report, htmlReportFilename);
// write CSV report
CsvUtil.saveResultSetToFile(csvReportPath, aggregatedResults);
}
Aggregations