1
0
mirror of https://github.com/Morantron/tmux-fingers.git synced 2024-06-25 07:27:52 +02:00
tmux-fingers/benchmark.sh
2023-11-10 15:20:11 +01:00

21 lines
558 B
Bash
Executable File

#!/usr/bin/env bash
/opt/use-tmux.sh 3.3a
shards build --production
tmux -f /app/spec/conf/benchmark.conf new-session -d
tmux resize-window -t '@0' -x 300 -y 300
tmux send-keys 'COLUMNS=300 LINES=100 crystal run spec/fill_screen.cr'
tmux send-keys Enter
sleep 5
echo "Running benchmarks ..."
tmux new-window 'hyperfine --warmup 5 --runs 1000 "bin/tmux-fingers start %0 self" --export-markdown /tmp/benchmark-output'
echo "Waiting for results ..."
timeout 60 bash -c 'while [[ ! -s /tmp/benchmark-output ]]; do sleep 1; done'
cat /tmp/benchmark-output