chore: add scripts to run benchmarks

This commit is contained in:
Simon Cruanes 2023-12-01 13:45:54 -05:00
parent 77bfa34355
commit 4d581498ae
3 changed files with 9 additions and 7 deletions

View file

@ -14,12 +14,6 @@ clean:
doc:
dune build @doc
BENCH_TARGETS=run_benchs.exe run_bench_hash.exe
benchs:
dune build $(addprefix benchs/, $(BENCH_TARGETS)) --profile=release
@for i in $(BENCH_TARGETS) ; do ln -sf _build/default/benchs/$$i ; done
examples:
dune build examples/id_sexp.exe
@ -39,4 +33,4 @@ reindent:
@find src '(' -name '*.ml' -or -name '*.mli' ')' -type f -print0 | xargs -0 echo "reindenting: "
@find src '(' -name '*.ml' -or -name '*.mli' ')' -type f -print0 | xargs -0 ocp-indent -i
.PHONY: all benchs test clean build doc update_next_tag watch examples
.PHONY: all test clean build doc update_next_tag watch examples

4
run_bench_hash.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
OPTS="--profile=release --display=quiet"
exec dune exec $OPTS -- benchs/run_benchs_hash.exe $@

4
run_benchs.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
OPTS="--profile=release --display=quiet"
exec dune exec $OPTS -- benchs/run_benchs.exe $@