Skip to content

testing: reporting non-standard benchmark results #16110

@benburkert

Description

@benburkert

I would like to report the results of non-standard benchmark (non google/benchmark style) along side existing benchmarks, and do so following the proposed Go benchmark data format. For example, the pbench package reports percentiles in addition to the standard results.

I was unable to implement this benchmark without using reflection to access some unexported fields, and there was no mechanism for using the same io.Writer for the output. A preferable solution would be a new method on B that, provided a name & benchmark-result argument, formats and writes the results in the standard format.

Additionally, adding a ReportAllocs field to BenchmarkResults would be useful for when a benchmark is run with -benchmem but a non-standard benchmark does not support malloc statistics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions