Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support features in benchmarks #1461

Merged
merged 6 commits into from
Aug 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix
  • Loading branch information
raviqqe committed Aug 25, 2024
commit cbc754309d29bd0382240a1619aaf119bc8e0751
19 changes: 14 additions & 5 deletions tools/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
set -ex

interpreter=stak-interpret
filter=.

while getopts fi: option; do
while getopts di: option; do
case $option in
f)
filter=$OPTARG
d)
build_options=--no-default-features
;;
i)
interpreter=$OPTARG
Expand All @@ -18,6 +17,10 @@ done

shift $(expr $OPTIND - 1)

if [ $# -ne 0 ]; then
exit 1
fi

brew install chibi-scheme gambit-scheme gauche

cargo install hyperfine
Expand All @@ -27,12 +30,18 @@ cd $(dirname $0)/..
for directory in . cmd/minimal; do
(
cd $directory
cargo build --release $@
cargo build --release $build_options
)
done

export PATH=$PWD/target/release:$PWD/cmd/minimal/target/release:$PATH

filter=.

if [ $# -gt 0 ]; then
filter="$@"
fi

for file in $(find bench -type f -name '*.scm' | sort | grep $filter); do
base=${file%.scm}

Expand Down
Loading