Skip to content

Instantly share code, notes, and snippets.

@NotYusta
Created June 29, 2026 16:18
Show Gist options
  • Select an option

  • Save NotYusta/95de96b2ceb653f24ff214cd2031a62e to your computer and use it in GitHub Desktop.

Select an option

Save NotYusta/95de96b2ceb653f24ff214cd2031a62e to your computer and use it in GitHub Desktop.
benchmark_geekbench_loop
#!/bin/bash
set -uo pipefail
RUNS=8
OUTPUT_DIR="results"
mkdir -p "$OUTPUT_DIR"
for i in $(seq 1 $RUNS); do
timestamp=$(date +"%Y%m%d_%H%M%S")
logfile="$OUTPUT_DIR/run_${i}_${timestamp}.log"
echo "==================================================" | tee -a "$logfile"
echo "Run $i/$RUNS - $(date)" | tee -a "$logfile"
echo "==================================================" | tee -a "$logfile"
./geekbench6 2>&1 | tee -a "$logfile"
exitcode=${PIPESTATUS[0]}
echo "" >> "$logfile"
echo "Exit code: $exitcode" >> "$logfile"
echo "Finished: $(date)" >> "$logfile"
if [ "$exitcode" -ne 0 ]; then
echo "Run $i exited with code $exitcode"
fi
sleep 5
done
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment