Search in sources :

Example 1 with TabularResultSet

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);
    }
}
Also used : PerfTestConfiguration(org.camunda.bpm.qa.performance.engine.framework.PerfTestConfiguration) PerfTestResult(org.camunda.bpm.qa.performance.engine.framework.PerfTestResult) TabularResultSet(org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet)

Example 2 with TabularResultSet

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;
}
Also used : TabularResultSet(org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet)

Example 3 with 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");
}
Also used : TabularResultSet(org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet) File(java.io.File)

Example 4 with TabularResultSet

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);
}
Also used : HtmlReportBuilder(org.camunda.bpm.qa.performance.engine.framework.report.HtmlReportBuilder) TabularResultSet(org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet) File(java.io.File)

Example 5 with TabularResultSet

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);
}
Also used : HtmlReportBuilder(org.camunda.bpm.qa.performance.engine.framework.report.HtmlReportBuilder) TabularResultSet(org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet) File(java.io.File)

Aggregations

TabularResultSet (org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet)8 File (java.io.File)4 HtmlReportBuilder (org.camunda.bpm.qa.performance.engine.framework.report.HtmlReportBuilder)3 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 HtmlElementWriter (org.camunda.bpm.engine.impl.form.engine.HtmlElementWriter)1 PerfTestConfiguration (org.camunda.bpm.qa.performance.engine.framework.PerfTestConfiguration)1 PerfTestResult (org.camunda.bpm.qa.performance.engine.framework.PerfTestResult)1 SqlStatementCountAggregator (org.camunda.bpm.qa.performance.engine.framework.aggregate.SqlStatementCountAggregator)1