Repository navigation
benchmarking: append the suspend/resume phase percentiles to stats.jsonl from the runner - #2148
Draft
Lucky Abolorunke (Oneimu) wants to merge 4 commits into
Draft
Lucky Abolorunke (Oneimu) wants to merge 4 commits into
Lucky Abolorunke (Oneimu) wants to merge 4 commits into
Conversation
…nd, read logging exports
…onl from the runner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
benchmarking: append the suspend/resume phase percentiles to stats.jsonl from the runner
Stacked on #2009 (base branch
phase-logs-analysisuntil it merges).Why
#2009 adds the tool that turns the
Checkpoint/Restore timing breakdownrecords into percentiles, but nothing in the automated runs calls it: the orchestrator deletes the worker and ate-system pods as soon as a test's runner exits, so the records never reachstats.jsonlor anything that reads it. The runner is the one process that holds the run's identity, ownsstats.jsonl, and is still alive while the pods are — so it does the collection itself, the way it already collects cluster facts.What
locust/phase_breakdown.py(new): after locust finishes, lists theapp=ateletpods inate-systemand theate.dev/worker-poolpods inbenchmark-workloadsthrough the Kubernetes client, reads their logs since the run started (a restarted container's previous log too), parses the records withphase_report, and appends tostats.jsonl:metric: phase_<layer>_<op>_<class>_<kind>_<scope>_<phase>,measurements: those dimensions as fields pluscount,p50_ms,p90_ms,p95_ms,max_ms, all strings like the runner's other rows;phase_breakdown_summaryrow: pods read and failed, record count, and the atelet checkpoint/restore record counts next to locust'sSuspendActor/ResumeActorrequest counts. Fewer records than requests means a node log rotated during the run; the runner's log says so.Additive like the cluster facts: a failure here never costs the locust rows.
locust/runner.py:--phase-breakdown(default on,--no-phase-breakdownto skip), called after the cluster-facts block.automation/manifests/runner-job.yaml.tmpl:benchmark-runnergainsget/listonpodsandgetonpods/login both namespaces.locust/Dockerfile: copiesphase_breakdown.pyandanalysis/phase_report.pyinto the image.analysis/phase_report.py:parse_lines()andstats_rows()for the above (the CLI is unchanged).analysis/README.md"Automated runs", the flag inbenchmarking/README.md, a pointer in the runbook.Testing
python3 -m unittest discover -s benchmarking/locust/unit_tests— 18 tests (4 new, mockedCoreV1Api: rows appended in shape, rotation warning, unreadable pod skipped, restarted container read twice, empty run still writes the summary, failed requests don't trigger the warning).python3 -m unittest discover -s benchmarking/analysis— 22 tests.append_phase_breakdownread the six pods and wrote 46 phase rows plus the summary (12 atelet checkpoints vs 10 locust suspends + 2 shutdown suspends). The template's RBAC was applied and a log read impersonatingbenchmark-runnersucceeded in both namespaces.