Skip to content

Commit

Permalink
scripts/bench: add nobench option -n
Browse files Browse the repository at this point in the history
The nobench option serves to report on previously collected benchmark
results. It calls QUAVIVER/BENCHMARK:REPORT instead of running any
benchmarks.

It requires SBCL.

* scripts/bench: Parse -n option, setting nobench variable
appropriately. If nobench is set, call QUAVIVER/BENCHMARK:REPORT and
exit.
(nobench): New variable.
  • Loading branch information
paulapatience committed Jun 29, 2024
1 parent c67e849 commit b0340d5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/bench
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set -o nounset
set -o pipefail
set -o errexit

nobench=
tag=
verbose=

Expand Down Expand Up @@ -104,6 +105,10 @@ while test "$#" -gt 0; do
shift
break
;;
-n)
nobench="nobench"
shift
;;
-t)
if test "$#" -lt 2; then
printf >&2 "bench: missing argument for option: %s\n" "$1"
Expand All @@ -126,6 +131,15 @@ while test "$#" -gt 0; do
esac
done

if test -n "$nobench"; then
command sbcl --noinform --disable-debugger \
--eval '(require "asdf")' \
--eval '(asdf:load-system "quaviver/benchmark")' \
--eval '(quaviver/benchmark:report)' \
--eval '(uiop:quit)'
exit
fi

if test "$#" -le 0; then
for implementation in abcl ccl clasp ecl sbcl; do
if command -v "$implementation" >/dev/null; then
Expand Down

0 comments on commit b0340d5

Please sign in to comment.