mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
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
2 changed files with 17 additions and 0 deletions
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…
Reference in a new issue