Add CSV and JSONL statistics output - #4
Open
m4r1k wants to merge 1 commit into
Open
Conversation
m4r1k
marked this pull request as ready for review
August 11, 2026 10:07
m4r1k
force-pushed
the
pr/stats-export-v0.3.0
branch
from
August 12, 2026 17:08
470295b to
5c97267
Compare
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.
Wireblast's terminal output is useful while a run is active, but benchmark
automation should not have to parse display text. This adds optional
machine-readable statistics to
--no-tui.--stats-file PATHcreates a new output file and refuses to overwrite anexisting one. CSV is the default format;
--stats-format jsonlselectsnewline-delimited JSON. Each one-second sample is flushed immediately, so an
interrupted run still leaves usable records. Clean shutdown adds a final
aggregate and one record for every AF_XDP queue.
Every record has a schema version, UTC timestamp, elapsed time, traffic totals
and rates, and the Linux
XDP_STATISTICScounters. The schema distinguishesWireblast packet totals from AF_XDP ring accounting:
kernel_rx_descriptorsandkernel_tx_descriptorsreport descriptor progress,not packet counts. A multi-buffer packet can occupy more than one descriptor.
The six AF_XDP counter fields use their Linux UAPI names.
The existing terminal output is unchanged. Statistics paths and formats belong
to one invocation and are not saved in wizard preferences. The patch adds no
dependencies.
The CSV path was also exercised between paired Google Cloud C4N instances from
c4n-highcpu-2throughc4n-highcpu-96. Every admitted run used gVNIC with theGVE driver, native XDP, and AF_XDP zero-copy. The inline CSV sample is derived
from a C96 IMIX run; its records come from the live capture and its four
counter headers have been updated to the final schema names used by this PR.
JSONL was covered by the exporter and CLI tests.
C96 gVNIC/GVE CSV sample
Tested with:
go test -count=1 ./...go test -race -count=1 ./...go vet ./...gofmt -l .go build -buildvcs=false ./cmd/wireblast