Skip to content

[FR] New "benchstat" output format #2397

Todo

Description

@DenysZm

This new compact format is going to help compare HLO A/B benchmarks in OpenXLA. The issue with the current format that it's horizontal output requires a very wide screen to fit all stats, if we're going to display and compare more than just wall time and CPU time. For example, for our case other useful metrics are allocations per operation(loop) and peak allocation by a benchmark.

We propose to add a Go's benchstat-like output format, which summarizes A/B tests output and prints these summaries vertically (described here: https://pkg.go.dev/golang.org/x/perf/cmd/benchstat)

An alternative is to add these new metrics stats as new columns to existing output, but this will make output hard to read or require a very wide screen.

Below are files for comparing our typical A/B workflows output(default format is unchanged, while additional metrics are added in benchstat mode):
hlo_compare_default_format.txt
hlo_compare_benchstat_format.txt

I already have a draft patch, which implements this mode.

Activity

  1. dmah42 commented on Nov 24, 2026

    @dmah42
    Member

    can you parse the json output into this format with an external tool? that's probably easier than adding a new reporter format to the core library.

  2. DenysZm commented on Nov 24, 2026

    @DenysZm
    Author

    Yes, this is definitely doable.
    On the other hand - it might be possible that the format will be useful to other users as well. What do you think?

  3. dmah42 commented on Nov 24, 2026

    @dmah42
    Member

    perhaps we can have the parser/tool as a contribution in the repo, just not as part of the C++ core library, if you're open to that? i agree it sounds useful and i really like the go output :)

  4. DenysZm commented on Nov 24, 2026

    @DenysZm
    Author

    Yes, the idea was to modify only Python results parsers: tools/compare.py and tools/gbench/report.py and to add notes about the format in docs/tools.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions