Plot track 1 series and tabulate the ceilings
tools/plot_track1.py reads any set of summary.csv files and draws, per series, successful RPS, p95 and p99 against the offered rate and CPU per component against its limit, plus two cross-series charts: peak successful RPS against total API CPU with the linear growth line, and the utilisation of API, PostgreSQL, balancer and the share of the pool waiting on a lock at each config's peak. A point is the median of the repeats, the whiskers are min and max. capacity.csv and capacity.md hold the SLO capacity, the peak and the resource figures at the peak. Colours follow the config across charts, every line also has its own marker and a direct label. matplotlib comes through uv run --with, so the tool lives in tools/ and stays out of the 3.9 scripts; make plots runs it, make lint covers it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8ea1996063
commit
e8804b05d0
@@ -10,7 +10,7 @@ COMPOSE ?= docker compose
|
||||
RATE ?= 100
|
||||
API_IMAGE ?= mtusi-messenger:lab3
|
||||
FROM_REV ?=
|
||||
SCRIPTS_PY = scripts/probe.py scripts/limits.py scripts/scaling.py
|
||||
SCRIPTS_PY = scripts/probe.py scripts/limits.py scripts/scaling.py tools
|
||||
TRACK1 = evidence/track1
|
||||
SCALING = $(PYTHON) scripts/scaling.py --fresh-db --start-per-cpu 150
|
||||
PSQL = $(COMPOSE) exec -T postgres psql -U messenger -d messenger -X -q
|
||||
@@ -20,7 +20,7 @@ PSQL = $(COMPOSE) exec -T postgres psql -U messenger -d messenger -X -q
|
||||
secrets up down reset-data migrate ps logs restore lb-check failover-evidence stack-evidence \
|
||||
persistence-evidence storage-evidence cache-evidence test-faults seed explain \
|
||||
limits detection failover-each rolling-update level4 \
|
||||
track1 track1-host track1-a track1-b
|
||||
track1 track1-host track1-a track1-b plots
|
||||
|
||||
help:
|
||||
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
|
||||
@@ -28,7 +28,7 @@ help:
|
||||
@echo "secrets/up/down/migrate/ps/logs: стенд Docker Compose; reset-data: намеренное удаление volumes"
|
||||
@echo "restore: вернуть остановленные реплики; lb-check: реплики на одном токене и 20 гонок одного ключа"
|
||||
@echo "level4 = limits, lb-check, detection, failover-each, rolling-update [FROM_REV=<коммит>]; RATE=$(RATE) rps"
|
||||
@echo "track1 = track1-host, track1-a (1x4/2x2/4x1), track1-b (1x1/2x1/8x1) → $(TRACK1)"
|
||||
@echo "track1 = track1-host, track1-a (1x4/2x2/4x1), track1-b (1x1/2x1/8x1), plots → $(TRACK1)"
|
||||
|
||||
check:
|
||||
$(PYTHON) scripts/check_contract.py
|
||||
@@ -118,7 +118,7 @@ endif
|
||||
|
||||
level4: limits lb-check detection failover-each rolling-update
|
||||
|
||||
track1: track1-host track1-a track1-b
|
||||
track1: track1-host track1-a track1-b plots
|
||||
|
||||
track1-host:
|
||||
sh scripts/host-snapshot.sh $(TRACK1)/host.txt
|
||||
@@ -129,6 +129,10 @@ track1-a:
|
||||
track1-b:
|
||||
$(SCALING) --out $(TRACK1)/series-b --configs 1x1,2x1,8x1 --api-memory 512
|
||||
|
||||
plots:
|
||||
MPLBACKEND=Agg $(UV) run --no-project --python 3.14 --with 'matplotlib==3.11.2' \
|
||||
python tools/plot_track1.py --out $(TRACK1)/plots $(wildcard $(TRACK1)/*/summary.csv)
|
||||
|
||||
failover-evidence:
|
||||
sh scripts/failover-evidence.sh "$(BASE_URL)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user