tmux-fingers/benchmark.sh

21 lines
558 B
Bash
Raw Permalink Normal View History

2020-05-02 11:45:56 +02:00
#!/usr/bin/env bash
2023-09-13 16:40:08 +02:00
/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'
2020-05-02 11:45:56 +02:00
tmux send-keys Enter
2023-09-13 16:40:08 +02:00
sleep 5
2020-05-02 11:45:56 +02:00
2023-11-10 15:18:37 +01:00
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