The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit d1aa12ec authored by Philipp Meyer's avatar Philipp Meyer
Browse files

Fix script for generating benchmark table

parent 99973a5a
all: main.pdf
program: pp-print program: pp-print
@echo 'Compiling pp-print' @echo 'Compiling pp-print'
@$(MAKE) -C pp-print @$(MAKE) -C pp-print
...@@ -9,13 +11,13 @@ peregrine: ...@@ -9,13 +11,13 @@ peregrine:
protocols: program protocols: program
@./generate_protocols.sh @./generate_protocols.sh
results: protocols peregrine results/results.csv: protocols peregrine
@./run_benchmarks.sh @./run_benchmarks.sh
table.tex: results table.tex: results/results.csv
python3 make_table.py >table.tex python3 make_table.py >table.tex
pdf: table.tex main.pdf: table.tex
pdflatex main.tex pdflatex main.tex
clean: clean:
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
$|Q|$ & Number of states. \\ $|Q|$ & Number of states. \\
$|T|$ & Number of non-silent transitions. \\ $|T|$ & Number of non-silent transitions. \\
termination & Time in seconds to prove layered termination. \\ termination & Time in seconds to prove layered termination. \\
$|\mathcal{P}|$ & Number of blocks in the partition for layered termination. \\ $|\mathcal{P}|$ & Number of layers in the partition for layered termination. \\
consensus & Time in seconds to prove strong consensus. \\ consensus & Time in seconds to prove strong consensus. \\
$|\mathcal{R}|$ & Number of refinement steps (i.e.\ number of traps or siphons) for strong consensus. \\ $|\mathcal{R}|$ & Number of refinement steps (i.e.\ number of traps or siphons) for strong consensus. \\
total & Time in seconds to prove layered termination and strong consensus. \\ total & Time in seconds to prove layered termination and strong consensus. \\
......
...@@ -10,7 +10,8 @@ prop_steps = [ '$|\mathcal{P}|$', '$|R|$' ] ...@@ -10,7 +10,8 @@ prop_steps = [ '$|\mathcal{P}|$', '$|R|$' ]
max_params = 2 max_params = 2
long_table = True long_table = True
short_table = True short_table = False
if len(sys.argv) >= 2: if len(sys.argv) >= 2:
long_table = False long_table = False
short_table = False short_table = False
...@@ -87,9 +88,9 @@ if long_table: ...@@ -87,9 +88,9 @@ if long_table:
for i in range(len(params), max_params): for i in range(len(params), max_params):
row_string += " &" row_string += " &"
n_places = row['places'] n_states = row['states']
n_transitions = row['transitions'] n_transitions = row['transitions']
row_string += ' & %d & %d' % (n_places, n_transitions) row_string += ' & %d & %d' % (n_states, n_transitions)
total_time = 0.0 total_time = 0.0
total_timeout = False total_timeout = False
...@@ -166,9 +167,9 @@ if short_table: ...@@ -166,9 +167,9 @@ if short_table:
val = params[0][1:] val = params[0][1:]
row_string += "%s " % val row_string += "%s " % val
n_places = row['places'] n_states = row['states']
n_transitions = row['transitions'] n_transitions = row['transitions']
row_string += ' & %d & %d' % (n_places, n_transitions) row_string += ' & %d & %d' % (n_states, n_transitions)
total_time = 0.0 total_time = 0.0
total_timeout = False total_timeout = False
......
...@@ -21,7 +21,7 @@ mkdir -p $benchmark_dir/$out_dir ...@@ -21,7 +21,7 @@ mkdir -p $benchmark_dir/$out_dir
mkdir -p $benchmark_dir/$results_dir mkdir -p $benchmark_dir/$results_dir
>$benchmark_dir/$results_dir/results.csv >$benchmark_dir/$results_dir/results.csv
echo -n "protocol,file,places,transitions" >>$benchmark_dir/$results_dir/results.csv echo -n "protocol,file,states,transitions" >>$benchmark_dir/$results_dir/results.csv
for (( propi=0;propi<${#properties[@]};propi++)); do for (( propi=0;propi<${#properties[@]};propi++)); do
prop=${properties[$propi]} prop=${properties[$propi]}
...@@ -51,9 +51,9 @@ for protocol_dir in $(find $benchmark_dir/$protocols_dir -mindepth 1 -maxdepth 1 ...@@ -51,9 +51,9 @@ for protocol_dir in $(find $benchmark_dir/$protocols_dir -mindepth 1 -maxdepth 1
( (
$executable_dir/$executable $options $filename 2>&1 | tee $benchmark_dir/$out_dir/$protocol/$file.out $executable_dir/$executable $options $filename 2>&1 | tee $benchmark_dir/$out_dir/$protocol/$file.out
) )
n_places=$(grep -e 'Number of places' "$benchmark_dir/$out_dir/$protocol/$file.out" | sed -e 's/^.*: \([0-9]*\)$/\1/') n_states=$(grep -e 'Number of states' "$benchmark_dir/$out_dir/$protocol/$file.out" | sed -e 's/^.*: \([0-9]*\)$/\1/')
n_transitions=$(grep -e 'Number of transitions' "$benchmark_dir/$out_dir/$protocol/$file.out" | sed -e 's/^.*: \([0-9]*\)$/\1/') n_transitions=$(grep -e 'Number of transitions' "$benchmark_dir/$out_dir/$protocol/$file.out" | sed -e 's/^.*: \([0-9]*\)$/\1/')
echo -n ",$n_places,$n_transitions" >>$benchmark_dir/$results_dir/results.csv echo -n ",$n_states,$n_transitions" >>$benchmark_dir/$results_dir/results.csv
for (( propi=0;propi<${#properties[@]};propi++)); do for (( propi=0;propi<${#properties[@]};propi++)); do
prop=${properties[$propi]} prop=${properties[$propi]}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment