sots-re/verify/harness/profiling/shots.sh

11 lines
381 B
Bash

#!/bin/bash
# on spicy: burst screendumps of VM140 to /tmp/shots/<tag>/ at ~1 Hz for N seconds
TAG=$1; N=${2:-90}
D=/tmp/shots/$TAG; mkdir -p $D; rm -f $D/*
END=$(( $(date +%s) + N )); i=0
while [ $(date +%s) -lt $END ]; do
i=$((i+1)); f=$(printf %03d $i)
echo "screendump $D/$f.ppm" | qm monitor 140 >/dev/null 2>&1
echo "$f $(date +%s.%N)" >> $D/times.txt
sleep 0.6
done