Skip to content

Commit 8e1cf18

Browse files
authored
Merge pull request #4259 from smowton/smowton/admin/benchmark-script-improvements
Benchmark script improvements
2 parents f9edf73 + 587b701 commit 8e1cf18

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

scripts/benchmark/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Assuming there is a java maven module installed in `project-name/module-core/`,
1414
and the `jbmc` main directory is in `/path/to/jbmc`, go to
1515
`project-name/module-core/target/classes`, and run:
1616

17-
/path/to/scripts/benchmark/benchmark_java_project.js /path/to/jbmc -l method_list_example.txt -a java_arguments.json -m path/to/jbmc/lib/java-models-library/target/core-models.jar | tee result.json
17+
/path/to/scripts/benchmark/benchmark_java_project.js /path/to/jbmc -l method_list_example.txt -a jbmc_arguments_example.json -m path/to/jbmc/lib/java-models-library/target/core-models.jar | tee result.json
1818

1919
This will display the results and save them into the file `result.json`.
2020

@@ -29,9 +29,9 @@ This will create a `result.csv` file containing the results.
2929
# Comparing two runs
3030

3131
Assuming the results have been converted to csv and saved into two files named
32-
benchmark1.csv and benchmark2.csv:
32+
develop.csv and branch.csv:
3333

3434
gnuplot draw_scatter.gp
3535

36-
will create a png file `perf_out.png` with the time from the first run on the
37-
`y` axis and the second on the `x` axis.
36+
will create a png file `perf_out.png` with the time from the branch / changed run on the
37+
`y` axis and the develop / original run on the `x` axis.

scripts/benchmark/benchmark_java_project.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function readNumberOfGoals(stdout) {
6666
return 0;
6767
}
6868
function readJsonFile(fileName) {
69-
return JSON.parse(fs.readFileSync(filename, 'utf8'));
69+
return JSON.parse(fs.readFileSync(fileName, 'utf8'));
7070
}
7171

7272
/// Read the options from tools.json and launch the executable
@@ -92,7 +92,7 @@ function run(executable, modelsPath, argumentsFile, functionName,
9292
// timeout isn't a jbmc option but only used by this script
9393
const timeout = config.timeout;
9494
config['timeout'] = false;
95-
commandLine = `${executable} ${classFile} ${configToString(config)}`
95+
commandLine = `${executable} ${classFile} ${argsToString(config)}`
9696
const startTime = new Date();
9797
try {
9898
const timeCommand = "export TIME=\"%U\"; /usr/bin/time --quiet -o tmp_time.out "

scripts/benchmark/draw_scatter.gp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ set xrange [30:60000]
77
set yrange [30:60000]
88
set logscale x 10
99
set logscale y 10
10-
set ylabel 'time (sec.) on branch'
1110
set xlabel 'time (sec.) on develop'
11+
set ylabel 'time (sec.) on branch'
1212

13-
plot '< join benchmark1.csv benchmark2.csv' using 6:3 with points, \
13+
plot '< join develop.csv branch.csv' using 3:6 with points, \
1414
x with lines

0 commit comments

Comments
 (0)