Skip to content

Commit dc511d0

Browse files
committed
Shell Benchmark tool
1 parent 70f70c5 commit dc511d0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

bench.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
COMPILE="mojo build *.mojo"
3+
BENCH="hyperfine -N -w 10 "
4+
5+
for dir in *; do
6+
if [ -d "$dir" ]; then
7+
COMMANDS=("python ${dir}.py")
8+
COMMANDS+=($dir)
9+
cd "$dir"
10+
echo "Benchmarking $dir"
11+
$COMPILE
12+
$BENCH "${COMMANDS[@]}"
13+
cd ..
14+
fi
15+
done

0 commit comments

Comments
 (0)