Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at https://doku.lrz.de/display/PUBLIC/GitLab and make sure that your projects conform to the requirements.

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
@echo 'Compiling pp-print'
@$(MAKE) -C pp-print
......@@ -9,13 +11,13 @@ peregrine:
protocols: program
@./generate_protocols.sh
results: protocols peregrine
results/results.csv: protocols peregrine
@./run_benchmarks.sh
table.tex: results
table.tex: results/results.csv
python3 make_table.py >table.tex
pdf: table.tex
main.pdf: table.tex
pdflatex main.tex
clean:
......
......@@ -14,7 +14,7 @@
$|Q|$ & Number of states. \\
$|T|$ & Number of non-silent transitions. \\
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. \\
$|\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. \\
......
......@@ -10,7 +10,8 @@ prop_steps = [ '$|\mathcal{P}|$', '$|R|$' ]
max_params = 2
long_table = True
short_table = True
short_table = False
if len(sys.argv) >= 2:
long_table = False
short_table = False
......@@ -87,9 +88,9 @@ if long_table:
for i in range(len(params), max_params):
row_string += " &"
n_places = row['places']
n_states = row['states']
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_timeout = False
......@@ -166,9 +167,9 @@ if short_table:
val = params[0][1:]
row_string += "%s " % val
n_places = row['places']
n_states = row['states']
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_timeout = False
......
......@@ -21,7 +21,7 @@ mkdir -p $benchmark_dir/$out_dir
mkdir -p $benchmark_dir/$results_dir
>$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
prop=${properties[$propi]}
......@@ -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
)
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/')
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
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