Skip to content

proposal: testing: add a flag to report benchmark metrics for each run #51218

Closed

Description

@BrennaEpp

I would like the package to be able to report metrics for each run, not just an aggregate.

I want to be able to analyze and graph the data using external tools, so I need the runtime etc. of each iteration of the benchmark. Using the built-in benchmarking is great but I need to see the distribution of individual iterations.

Activity

  1. added this to the Proposal milestone on Feb 16, 2022
  2. davecheney commented on Feb 16, 2022

    @davecheney
    Contributor

    The reason the benchmark tool suppresses the intermediate benchmark runs is they are not statistically significant. Even the final benchmark number is not accurate in and of itself, it should be combined with flags like -count and tools like benchstat to account for warmup and cpu throttling issues.

  3. changed the title [-]proposal: testing(benchmark): add a flag to report metrics for each run[/-] [+]proposal: testing: add a flag to report benchmark metrics for each run[/+] on Feb 16, 2022
  4. rsc commented on Feb 16, 2022

    @rsc
    Contributor

    As @davecheney said, -count is the way to get multiple runs. You can also drop -benchtime to be lower than the default 2s if you want many short runs.

    There is no way to get the distribution of every iteration in a particular run, because the benchmark functions themselves do that loop from 0 to b.N.

  5. rsc commented on Feb 16, 2022

    @rsc
    Contributor

    No change in consensus, so declined.
    — rsc for the proposal review group

  6. moved this to Declined in Proposalson Aug 10, 2022
  7. locked and limited conversation to collaborators on Feb 16, 2023
  8. removed this from Proposalson Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions