Analysis scripts¶
A pandas pipeline, snap-benchmark-analysis, that turns runs'
events.jsonl files into KPI tables, a workbook and charts. It keeps the
runs it has read, so each new run is added to what came before and every
output is rebuilt from the full set.
| Page | What it covers |
|---|---|
| Run the analysis | Running it, filling in prices, and reading the results |
| Outputs | Every CSV file, the workbook and the charts: what each holds and what to use it for |
| Metrics and rules | How each metric is worked out, the reliability flags, and the known gaps |
It runs on your workstation, not on the hosts. It needs pandas, openpyxl
and matplotlib, which are the project's analysis extra, so the client
hosts don't install them. Its source is src/snap_benchmark_analysis/, and
README_ASR_v2_4.txt there defines every column.
Modules¶
| Module | Role |
|---|---|
run_asr_benchmark_analysis.py |
Command-line entry point |
asr_log_parser.py |
Finds events.jsonl files, removes duplicate runs, reads events into raw tables, and reads and writes the stored runs. No KPI maths. |
asr_analysis.py |
Every calculation: request metrics, run, load and hardware summaries, network adjustment, server-metric deltas and latency, accelerator use and energy, reliability flags, and the CSV export |
asr_report_generator.py |
The Excel workbook |
charts.py |
The PNG charts |
reference_pricing.py |
snap-benchmark-pricing, which fills in reference_pricing.csv |
asr_common.py |
Shared helpers, the request columns, and the ParseResult container |
Pipeline¶
- Discover. Only
.jsonlinputs are read: files, run directories, or a runs folder (each<run-id>/events.jsonlin it). - De-duplicate. Each file's
run_id(fromrun_start) is checked against the runs already stored and the rest of the batch. Duplicates are skipped, and a file without arun_idis rejected. - Parse new runs into raw observation tables and add them to the
store (
<analysis folder>/pkl). The tables arerequests,runs,resources,streams,server_metrics(cumulative samples only),network_baseline,diagnosticsandraw_event_counts. They hold no derived metrics. Each log is read as a stream, keeping only what the analysis uses. - Reload every stored run.
- Analyse everything from the reloaded data.
- Write the CSV files (up to 16), the workbook and the charts, regenerated from scratch each time (Outputs).
What the parser handles:
- Telemetry:
nvidia-smiCSV andneuron-monitorJSON are parsed into resource samples, which are matched to streams bymono_nswindow. - Journal: only lines at error priority or worse (and
journalctlerrors) are kept, as diagnostics. - Completeness: each run records whether
seqhas gaps or duplicates and whetherrun_endwas seen. - Plan runs: the
runstable has one row per run and target, becausetarget_start, the warm-up events andtarget_endare written per target. Each request takes the clip metadata of its owninput_id, so a manifest run's requests describe their own clip. Sweep settings are read fromoptions.jobs. - What the server ran: the log sidecar's
/healthat each target's start gives vLLM's command line, API server and engine counts, which go in therunstable. - Warm-up: warm-up rows stay in the stored data, tagged
run_phase, and are left out of every calculated table.
Tests¶
Its tests are in tests/analysis/, with the event fixtures and the check
against the JSONL events spec in
tests/analysis/analysis_events.py. Run them from the repository root:
uv run --extra analysis pytest -q tests/analysis