feat: add private S3 attachments and safe reconciliation

This commit is contained in:
Vladislav Agapov
2026-10-29 16:27:20 +03:00
parent ec540a1a72
commit aca4c4eea9
217 changed files with 15042 additions and 44 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
# Measure the owned local API process RSS while ten clients upload concurrently.
set -eu
: "${API_PID:?Pass the PID of this lab API}" "${BASE_URL:=http://127.0.0.1:18084}"
mkdir -p evidence/current
sampler=
cleanup() {
if [ -n "$sampler" ]; then kill "$sampler" 2>/dev/null || true; wait "$sampler" 2>/dev/null || true; fi
}
trap cleanup EXIT INT TERM
(
while kill -0 "$API_PID" 2>/dev/null; do
ps -o rss= -p "$API_PID"
sleep 0.1
done
) > evidence/current/upload-rss-kib.txt &
sampler=$!
BASE_URL="$BASE_URL" k6 run --summary-export evidence/current/upload-summary.json student-tests/load/attachments.js > evidence/current/upload.txt 2>&1
awk 'BEGIN {max=0} $1>max {max=$1} END {print "peak_rss_kib=" max}' evidence/current/upload-rss-kib.txt