Skip to content

Commit

Permalink
cyb file naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mjok committed Dec 14, 2020
1 parent fa499a3 commit 86a159b
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -51,6 +51,9 @@
import java.io.FileFilter;
import java.util.Map;

import static com.gocypher.cybench.launcher.utils.Constants.CYB_REPORT_CYB_FILE;
import static com.gocypher.cybench.launcher.utils.Constants.CYB_REPORT_JSON_FILE;


public class BenchmarkState extends CommandLineState {

Expand Down Expand Up @@ -144,6 +147,7 @@ private GeneralCommandLine createCommandLine() throws ExecutionException {
}
String reportFileName = getReportFileName(String.valueOf(configuration.getValueStore().get(CyBenchConfigurableParameters.REPORT_NAME)));
javaParameters.getVMParametersList().add(getReportFNameParameter(reportFileName));
javaParameters.getVMParametersList().add(getReportCybNameParameter(reportFileName.replace(".cybench", ".cyb")));
javaParameters.getVMParametersList().add("-D" + Constants.APPEND_SCORE_TO_FNAME + "=" + Boolean.TRUE);

cyBenchResultTreeConsoleView.setReportFile(reportFileName);
Expand All @@ -161,7 +165,13 @@ private String getReportFileName(String benchmarkName) {
}

private String getReportFNameParameter(String reportFileName) {
String key = "report.json";
String key = CYB_REPORT_JSON_FILE;
return "-D" + key + "=" + reportFileName;

}

private String getReportCybNameParameter(String reportFileName) {
String key = CYB_REPORT_CYB_FILE;
return "-D" + key + "=" + reportFileName;

}
Expand Down

0 comments on commit 86a159b

Please sign in to comment.