Skip to content

cmd/sweep: add the cluster sweep orchestrator and its Typst report - #337

Open
meling wants to merge 4 commits into
benchmark/workloadsfrom
cmd/sweep
Open

cmd/sweep: add the cluster sweep orchestrator and its Typst report#337
meling wants to merge 4 commits into
benchmark/workloadsfrom
cmd/sweep

Conversation

@meling

@meling meling commented Aug 11, 2026

Copy link
Copy Markdown
Member

Adds sweep, which runs a benchmark matrix across a cluster and turns the results into a report.

It deploys binaries to the hosts, drives each run, collects the per-node results, and can list, replay, convert, and export them. The sweep axes include the send and receive buffer dimensions, bridged to benchkit's canonical dimension names so a run is described the same way end to end. Results export as plotdata.binpb, as CSV, and as a compact transfer that can be rebuilt from a completed run without re-running it.

The report is generated with Typst: figures planned per metric and per x dimension, laid out in sections with ordered legends, and annotated with node-health, degraded-share, status, and clock-offset diagnostics, Student's t confidence intervals, named cross-repetition outliers, a failed-runs section, and optional LLM triage over the plot data.

Orchestrating a real cluster is where most of the failure modes are, so the robustness work is part of this: remote paths are shell-quoted, cleanup is chunked to stay under argument-length limits, the output scanner grows its buffer for long lines, port checks are distinguished from reachability failures, launch goroutines are joined rather than abandoned, a detached run can be recovered, and -collect-no-wait salvages results from a wedged driver.

This retires cmd/plot and the Python plotting scripts.

Why the orchestrator and the report are one PR. They were planned as two, but benchkit/cmd/sweep is a single Go package and the halves call each other: driver.go calls autoReport, and the plot-mode planner the orchestrator needs calls the report's figure layout, cdfRun, and timeSeriesRunFigures. Three file partitions were tried, down to just report.go and typstlib.go; every one left the package uncompilable in both directions. Splitting would have meant re-authoring a report-free version of the package and then reverting it.

Verification: go test ./... -count=1, go test ./benchkit/... -count=1, gofmt -l.

Top of the stack. With this merged the tree matches the reference tip exactly, apart from one deliberate gofmt fix in report.go.

Copilot AI lite review requested due to automatic review settings August 11, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@deepsource-io

deepsource-io Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

DeepSource Code Review

We reviewed changes in 8d5e9ae...1077e6c on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Go Aug 12, 2026 12:38p.m. Review ↗
Shell Aug 12, 2026 12:38p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@meling meling changed the title cmd/sweep cmd/sweep: add the cluster sweep orchestrator and its Typst report Aug 11, 2026
meling added 4 commits August 12, 2026 14:30
sweep runs a benchmark matrix across a cluster and turns the results into a
report. It deploys binaries to the hosts, drives each run, collects the
per-node results, and can list, replay, convert, and export them; the sweep
axes include the send and receive buffer dimensions, bridged to benchkit's
canonical dimension names so a run is described the same way end to end.

Results export as plotdata.binpb, as CSV, and as a compact transfer that can be
rebuilt from a completed run without re-running it.

The report is generated with Typst: figures are planned per metric and per x
dimension, laid out in sections with ordered legends, and annotated with
node-health, degraded-share, status, and clock-offset diagnostics, Student's t
confidence intervals, named cross-repetition outliers, a failed-runs section,
and optional LLM triage over the plot data.

Orchestrating a real cluster is where most of the failure modes are, so the
robustness work is part of this: remote paths are shell-quoted, cleanup is
chunked to stay under argument-length limits, the output scanner grows its
buffer for long lines, port checks are distinguished from reachability
failures, launch goroutines are joined rather than abandoned, a detached run can
be recovered, and -collect-no-wait salvages results from a wedged driver.

The orchestrator and the report are one Go package: the driver generates a
report at the end of a run, and the plot-mode planner the orchestrator needs
calls into the report's figure layout. They are therefore one PR rather than
the two the plan projected.
benchmarking.md covers running a benchmark, locally and across a cluster, and
reading what comes back. The benchkit HTML pages document the harness surface
and the troubleshooting paths for a run that fails partway.

The developer guide gains the make targets these tools add.
The struct literal's field alignment was off, which gofmt -l flags. No behavior
change; gofmt -l is now clean across every workspace module.
The role test was spelled out twice, once as n.server && !n.client and
once as its negation, and the negated form reads as a double negative.
Bind it to serverMeasuredOnly so both uses read the same and only the
positive form appears.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants