Files
mtusi2026lab2/scripts/track1/run-all.sh
T
Mraksimus dc5abb6fff
Skeleton contracts / contracts (pull_request) Canceled after 0s
Completed for a grade of five
2026-10-09 11:50:01 +03:00

41 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# Full track 1 matrix. Repeats go round-robin over all combinations, so a slow drift of the laptop does not
# land on one variant. Takes about 25 minutes.
set -eu
cd "$(dirname "$0")/../.."
rm -rf evidence/track1
docker compose build -q api
for repeat in 1 2 3; do
for tokens in 50 10; do
for variant in off on; do
VARIANT=$variant TOKENS=$tokens REPEAT=$repeat ./scripts/track1/stampede.sh
done
done
for variant in off on; do
VARIANT=$variant REPEAT=$repeat ./scripts/track1/redis-restart.sh
done
done
# Two more cache restarts: a single failed request per restart is what the first version of this
# experiment caught, so the restart gets more repeats than the rest.
for repeat in 4 5; do
for variant in off on; do
VARIANT=$variant REPEAT=$repeat ./scripts/track1/redis-restart.sh
done
done
# Reference without any cache invalidation: how many lookups a warm cache leaves.
for variant in off on; do
VARIANT=$variant TOKENS=50 FLUSH_INTERVAL_S=0 REPEAT=1 ./scripts/track1/stampede.sh
done
for variant in off on; do
for redis in up down; do
VARIANT=$variant REDIS=$redis ./scripts/track1/read-after-write.sh > /dev/null
done
done
SESSION_CACHE_SINGLE_FLIGHT=true docker compose up -d --force-recreate --wait api >/dev/null 2>&1
python3 scripts/track1/aggregate.py