Skip to content

Commit 6d69183

Browse files
committed
add more SCION benchmarks
1 parent db15120 commit 6d69183

File tree

3 files changed

+53
-3
lines changed

3 files changed

+53
-3
lines changed

src/test/resources/dependencyAnalysis/scion-benchmarks/plotter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ def plot_result_with_err(ax, result_file, x, width):
2020
values = []
2121
stdDevs = []
2222
for name in test_results.keys():
23-
values.append(np.sum(test_results[name]))
23+
values.append(np.mean(test_results[name]))
2424
stdDevs.append(np.std(test_results[name]))
25-
25+
26+
print(values)
2627
ax.bar(x, values, width, yerr=stdDevs, label=get_pretty_name(result_file))
2728

2829

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
BASE_FLAGS=
4+
ANALYSIS_FLAGS="--enableAssumptionAnalysis --disableInfeasibilityChecks"
5+
ANALYSIS_WITH_INFEAS_FLAGS="--enableAssumptionAnalysis"
6+
PATH_TO_VERIFIED_SCION="C:\Users\Andrea\Documents\ETH\FS25\MasterThesis\VerifiedSCION"
7+
8+
RESULT_FILE=scion_benchmark_slayers_path_empty_$(date '+%Y_%m_%d_%H_%M_%S').csv
9+
touch $RESULT_FILE
10+
echo "test name,runtimes [s]" > $RESULT_FILE
11+
12+
function run(){
13+
ARGS="-Xss1g -Xmx4g
14+
-jar $PATH_TO_VERIFIED_SCION/gobra/gobra.jar
15+
-p $PATH_TO_VERIFIED_SCION/pkg/slayers/path/empty
16+
--norespectFunctionPrePermAmounts
17+
--backend SILICON
18+
--chop 1
19+
-I $PATH_TO_VERIFIED_SCION $PATH_TO_VERIFIED_SCION/verification/dependencies
20+
--onlyFilesWithHeader -m github.com/scionproto/scion
21+
--assumeInjectivityOnInhale --checkConsistency
22+
--mceMode=od --experimentalFriendClauses
23+
--moreJoins off
24+
-g /tmp/
25+
$2
26+
$3
27+
"
28+
echo "Executing $1"
29+
echo "$ARGS"
30+
total_duration=0
31+
NUM_RUNS=5
32+
runtimes=""
33+
for i in $(seq 1 $NUM_RUNS); do
34+
echo $i
35+
start=$(date +%s)
36+
java $ARGS
37+
end=$(date +%s)
38+
duration=$((end-start))
39+
total_duration=$(((total_duration+duration)));
40+
runtimes+=",$duration"
41+
done
42+
res=$((total_duration/NUM_RUNS))
43+
echo "Finished $1: mean runtime [s] ${res}s"
44+
echo "$1$runtimes" >> $RESULT_FILE
45+
}
46+
47+
run "baseline" $BASE_FLAGS
48+
run "analysis_sound" $ANALYSIS_FLAGS
49+
run "analysis_with_infeas_checks" $ANALYSIS_WITH_INFEAS_FLAGS

src/test/resources/dependencyAnalysis/scion-benchmarks/scion-benchmark.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function run(){
2929
echo "Executing $1"
3030
echo "$ARGS"
3131
total_duration=0
32-
NUM_RUNS=3
32+
NUM_RUNS=5
3333
runtimes=""
3434
for i in $(seq 1 $NUM_RUNS); do
3535
echo $i

0 commit comments

Comments
 (0)