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:
parent
b6555a0dc4
commit
2d4872ba60
3
benchmarks/benchmarks/seq_echo.fish
Normal file
3
benchmarks/benchmarks/seq_echo.fish
Normal file
@ -0,0 +1,3 @@
|
||||
for i in (seq 1000)
|
||||
echo $i
|
||||
end
|
14
benchmarks/driver.sh
Executable file
14
benchmarks/driver.sh
Executable 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user