Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for parsing loop times in Go benchmarks #228

Closed
gaby opened this issue Feb 12, 2024 · 3 comments
Closed

Add support for parsing loop times in Go benchmarks #228

gaby opened this issue Feb 12, 2024 · 3 comments

Comments

@gaby
Copy link

gaby commented Feb 12, 2024

This is a continuation of the fixes introduced in #224

    {
      name: 'Benchmark_AcquireCtx',
      value: 466.4,
      unit: 'ns/op\t    1568 B/op\t       5 allocs/op',
      extra: '2582733 times\n4 procs'
    },
    {
      name: 'Benchmark_AcquireCtx - ns/op',
      value: 466.4,
      unit: 'ns/op',
      extra: '2582733 times\n4 procs'
    },
    {
      name: 'Benchmark_AcquireCtx - B/op',
      value: 1568,
      unit: 'B/op',
      extra: '2582733 times\n4 procs'
    },
    {
      name: 'Benchmark_AcquireCtx - allocs/op',
      value: 5,
      unit: 'allocs/op',
      extra: '2582733 times\n4 procs'
    }

The 2582733 times never gets parsed using the latest version of this action. This value is how many times the loop was executed during the benchmark of the function. This is crucial data during a benchmark as it would let us know if the number of iterations run by the function has changed between code changes.

@gaby
Copy link
Author

gaby commented Feb 28, 2024

@ktrz Thoughts on this?

@ktrz
Copy link
Member

ktrz commented Mar 11, 2024

Hi @gaby

I am not sure what would be the value of treating the loop execution count as another benchmark. I'm afraid that adding this as another benchmark would more likely introduce more noise than benefit. As far as understand it (from reading the doc) it is more of the metadata about the benchmark itself rather than a value to keep track of. Basically the benchmark tool will run it as many times as it needs to get a statistically significant result
Screenshot 2024-03-11 at 19 22 16

@gaby
Copy link
Author

gaby commented Mar 18, 2024

@ktrz Fair, will close it. Thanks for your help! 💪

@gaby gaby closed this as completed Mar 18, 2024
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

No branches or pull requests

2 participants