mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +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
|
if [ "$#" -ne 1 ]; then
|
||||||
echo "Usage: driver.sh /path/to/fish"
|
echo "Usage: driver.sh /path/to/fish"
|
||||||
@ -10,5 +10,8 @@ BENCHMARKS_DIR=$(dirname "$0")/benchmarks
|
|||||||
for benchmark in "$BENCHMARKS_DIR"/*; do
|
for benchmark in "$BENCHMARKS_DIR"/*; do
|
||||||
echo $(basename "$benchmark")
|
echo $(basename "$benchmark")
|
||||||
${FISH_PATH} --print-rusage-self $benchmark > /dev/null
|
${FISH_PATH} --print-rusage-self $benchmark > /dev/null
|
||||||
|
if hash hyperfine 2>/dev/null; then
|
||||||
|
hyperfine "${FISH_PATH} $benchmark > /dev/null"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user