mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Use hyperfine in the benchmark driver if available
This commit is contained in:
parent
662fb3f3d1
commit
efe6fb3c3b
1 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: driver.sh /path/to/fish"
|
||||
|
@ -10,5 +10,8 @@ BENCHMARKS_DIR=$(dirname "$0")/benchmarks
|
|||
for benchmark in "$BENCHMARKS_DIR"/*; do
|
||||
echo $(basename "$benchmark")
|
||||
${FISH_PATH} --print-rusage-self $benchmark > /dev/null
|
||||
if hash hyperfine 2>/dev/null; then
|
||||
hyperfine "${FISH_PATH} $benchmark > /dev/null"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue