diff options
Diffstat (limited to 'test/monniaux')
-rw-r--r-- | test/monniaux/.gitignore | 9 | ||||
-rw-r--r-- | test/monniaux/Makefile | 12 | ||||
-rwxr-xr-x | test/monniaux/gengraphs.py | 10 | ||||
-rwxr-xr-x | test/monniaux/run_benches.sh | 7 |
4 files changed, 26 insertions, 12 deletions
diff --git a/test/monniaux/.gitignore b/test/monniaux/.gitignore index 12b3c9db..b051c860 100644 --- a/test/monniaux/.gitignore +++ b/test/monniaux/.gitignore @@ -1,5 +1,14 @@ **.host **.k1c +**measures.csv + +commands.txt +oracle_times.txt +verifier_times.txt +compile_times.pdf +measure_times.host.pdf +measure_times.k1c.pdf + binary_search/Makefile bitsliced-aes/Makefile bitsliced-tea/Makefile diff --git a/test/monniaux/Makefile b/test/monniaux/Makefile index 0831a93c..b436c034 100644 --- a/test/monniaux/Makefile +++ b/test/monniaux/Makefile @@ -2,7 +2,7 @@ CCOMP?=ccomp -all: compile_times.pdf +all: compile_times.pdf measure_times.k1c.pdf verifier_times.txt: Asmblockdeps.patch patch ../../extraction/Asmblockdeps.ml < $< @@ -16,9 +16,17 @@ oracle_times.txt: PostpassSchedulingOracle.patch bash clean_benches.sh bash build_benches.sh $@ +measures.csv: + (cd ../../ && make -j20 && make install) + bash build_benches.sh + bash run_benches.sh $@ + compile_times.pdf: gencompile.py verifier_times.txt oracle_times.txt python3.6 $^ $@ +measure_times.k1c.pdf: gengraphs.py measures.csv + python3.6 $^ $(basename $(basename $@)) + .PHONY: clean: - rm -f verifier_times.txt oracle_times.txt compile_times.pdf + rm -f verifier_times.txt oracle_times.txt compile_times.pdf measure_times.k1c.pdf measures.csv diff --git a/test/monniaux/gengraphs.py b/test/monniaux/gengraphs.py index 3ffe6f3d..c7532efd 100755 --- a/test/monniaux/gengraphs.py +++ b/test/monniaux/gengraphs.py @@ -10,9 +10,9 @@ from typing import * # Reading data ## -if len(sys.argv) != 2: - raise Exception("Only 1 argument should be given to this script: the make.proto file") -csv_file = sys.argv[1] +if len(sys.argv) != 3: + raise Exception("Arguments for this script: the csv file, the base name of the output PDF file") +_, csv_file, output_basename = sys.argv with open(csv_file, "r") as f: df = pd.read_csv(csv_file) @@ -90,5 +90,5 @@ def generate_file(f: str, cols: List[str]) -> None: plt.savefig(f) -generate_file("measures-host.pdf", host_measures_cols) -generate_file("measures-k1c.pdf", k1c_measures_cols) +generate_file(output_basename + ".host.pdf", host_measures_cols) +generate_file(output_basename + ".k1c.pdf", k1c_measures_cols) diff --git a/test/monniaux/run_benches.sh b/test/monniaux/run_benches.sh index 479d09eb..5f9f22cb 100755 --- a/test/monniaux/run_benches.sh +++ b/test/monniaux/run_benches.sh @@ -19,8 +19,5 @@ for bench in $benches; do fi done -nawk 'FNR==1 && NR!=1{next;}{print}' $benches_csv > measures.csv -echo "measures.csv done" - -./gengraphs.py measures.csv -echo "Graphs done" +nawk 'FNR==1 && NR!=1{next;}{print}' $benches_csv > $1 +echo "$1 done" |