Add a benchmark driver and a simple benchmark

This adds a simple script that drives benchmarks, and a simple sample
benchmark.
This commit is contained in:
ridiculousfish 2019-04-10 14:02:21 -07:00
parent b6555a0dc4
commit 2d4872ba60
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,3 @@
for i in (seq 1000)
echo $i
end

14
benchmarks/driver.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "Usage: driver.sh /path/to/fish"
fi
FISH_PATH=$1
BENCHMARKS_DIR=$(dirname "$0")/benchmarks
for benchmark in "$BENCHMARKS_DIR"/*; do
echo $(basename "$benchmark")
${FISH_PATH} --print-rusage-self $benchmark > /dev/null
done