test(e2e-chain): add opt-in --stress phase to the orchestrator
When --stress is passed, run the capacity matrix (stress.py/stress_run.py) after the correctness phase, writing stress_results.json into OUT_DIR/stress and handing its path to report_build.py for the PDF's Stress Tests section. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
# against the analytic/fed oracle, renders plots, and aggregates results.json.
|
||||
# Artifacts: Build/x86-linux/E2E/chain/ (report) and /tmp/chain_e2e/ (scratch).
|
||||
#
|
||||
# Usage: ./run_chain_e2e.sh [--skip-build] [--only <id>] [--pdf-only]
|
||||
# Usage: ./run_chain_e2e.sh [--skip-build] [--only <id>] [--pdf-only] [--cpp-coverage] [--stress]
|
||||
# --stress also runs the capacity matrix (stress.py / stress_run.py) and embeds a
|
||||
# Stress Tests section (table + per-axis scaling curves) in the PDF.
|
||||
set -u
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
@@ -25,13 +27,15 @@ SKIP_BUILD=0
|
||||
ONLY=""
|
||||
PDF_ONLY=0
|
||||
CPP_COV=0
|
||||
STRESS=0
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--skip-build) SKIP_BUILD=1 ;;
|
||||
--only) shift; ONLY="$1" ;;
|
||||
--pdf-only) PDF_ONLY=1 ;;
|
||||
--cpp-coverage) CPP_COV=1 ;;
|
||||
--help|-h) echo "Usage: $0 [--skip-build] [--only <id>] [--pdf-only] [--cpp-coverage]"; exit 0 ;;
|
||||
--stress) STRESS=1 ;;
|
||||
--help|-h) echo "Usage: $0 [--skip-build] [--only <id>] [--pdf-only] [--cpp-coverage] [--stress]"; exit 0 ;;
|
||||
*) echo "unknown arg $1" >&2; exit 2 ;;
|
||||
esac
|
||||
shift
|
||||
@@ -271,9 +275,25 @@ if [ "${CPP_COV}" -eq 1 ]; then
|
||||
(cd "${SCRIPT_DIR}/client" && go build -o chain-client . >/dev/null 2>&1) || true
|
||||
fi
|
||||
|
||||
# ── Stress matrix (opt-in) ───────────────────────────────────────────────────
|
||||
# Capacity sibling of the correctness phase: sweep one load axis at a time and
|
||||
# gate survival/liveness (hard) + RSS/zoom-p95 (soft). Writes stress_results.json
|
||||
# into OUT_DIR/stress, which report_build.py folds into the PDF when present.
|
||||
STRESS_OUT="${OUT_DIR}/stress"
|
||||
if [ "${STRESS}" -eq 1 ]; then
|
||||
echo ""
|
||||
echo "── Stress matrix ──"
|
||||
mkdir -p "${STRESS_OUT}"
|
||||
${PY} "${SCRIPT_DIR}/stress.py" >/dev/null || { echo "stress matrix invalid"; exit 1; }
|
||||
${PY} "${SCRIPT_DIR}/stress_run.py" \
|
||||
--marte "${MARTE_APP}" --hub "${STREAMHUB_EX}" --client "${CLIENT}" \
|
||||
--work "${WORK}" --out "${STRESS_OUT}" || true
|
||||
fi
|
||||
|
||||
# ── Consolidated report data (+ history/regression + trend plots) ────────────
|
||||
${PY} "${SCRIPT_DIR}/report_build.py" --repo "${REPO_ROOT}" \
|
||||
--results "${OUT_DIR}/results.json" --work "${WORK}" --out "${OUT_DIR}" || true
|
||||
--results "${OUT_DIR}/results.json" --work "${WORK}" --out "${OUT_DIR}" \
|
||||
--stress-results "${OUT_DIR}/stress/stress_results.json" || true
|
||||
|
||||
# ── PDF ──────────────────────────────────────────────────────────────────────
|
||||
if command -v typst >/dev/null 2>&1 && [ -f "${SCRIPT_DIR}/E2E_Report.typ" ]; then
|
||||
|
||||
Reference in New Issue
Block a user