mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
Use hyperfine in the benchmark driver if available
This commit is contained in:
parent
662fb3f3d1
commit
efe6fb3c3b
@ -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…
x
Reference in New Issue
Block a user