Add --plateau to null pyworker demo (default 5min)

Previously the first release fired only 30s after the third reservation
started, so the autoscaler often hadn't even finished provisioning the
third worker yet. Default plateau to 300s so all three workers are
visibly running before scale-down begins; configurable via --plateau.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rob Ballantyne
2026-05-11 18:26:31 +01:00
parent 8df562e243
commit 2aada7b210
2 changed files with 36 additions and 21 deletions
+7 -5
View File
@@ -151,11 +151,13 @@ Staggered demo:
python -m workers.null.client --endpoint <ENDPOINT_NAME> --demo
```
Starts three reservations 30s apart (all held concurrently) with a 90s
duration each. They scale down one at a time, also 30s apart, then the
client exits — a clean trapezoidal load curve for watching scale-up and
scale-down in the autoscaler dashboard. Each reservation ends via its
duration cap (a 200 success in metrics).
Starts three reservations 30s apart (all held concurrently), holds the
3-worker plateau for 5 minutes so the autoscaler has time to actually
provision the third worker before any scale-down starts, then scales
down one worker at a time, also 30s apart, and exits.
Each reservation ends via its duration cap (a 200 success in metrics).
Tune the timing with `--interval` and `--plateau`.
## Notes and caveats