#!/bin/bash # queue.sh — run bench batches one after another on the N100 (only this session deploys there). # heavy: up -> actions.sh -> 15 min rest -> down -> analyze # batch:: up a b c -> 15 min rest -> down -> analyze # Each batch copies its evidence before removing anything (bench.py down). A batch that fails # still runs `down`, so nothing is left deployed. cd "$(dirname "$0")" for item in "$@"; do IFS=: read -r kind tag apps <<<"$item" if [ "$kind" = heavy ]; then apps=$tag; fi list=${apps//,/ } echo "=== $(date -u +%T) $kind $tag: $list" python3 -I bench.py up "$tag" $list | tail -3 if [ "$kind" = heavy ]; then python3 -I run_action.py "$tag" "$tag" | grep -E '^@|->|up after|never|token length|status|trusted|media|ingest|library|transcode|onboarding|documents|api auth|mkcol|startup|add-library' | tail -25; fi python3 -I bench.py down "$tag" $list | tail -4 python3 -I analyze.py "../evidence/$tag" | head -20 done echo "=== $(date -u +%T) queue done"