bencheeorg / bencheeorg/benchee
Option to track statistics via an accumulator only
- Dominant language
- Elixir
- Stars
- 1.5k
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Description
Currently, Benchee stores all samples while benchmarking. This can cause some problems with memory usage and reporting, like those mentioned in #326 and bencheeorg/benchee_html#3.
Could we introduce a configuration option to instruct Benchee to store only metrics that can be calculated using accumulators? That way, instead of storing each sample, Benchee can store the accumulator and perform the final calculation at the end. This could reduce memory usage (and disk usage when saving previous benchmark runs) significantly.
Some statistics Benchee currently tracks wouldn't be supported under this option, since they can't be calculated via accumulator.
Statistics that would still work:
- Average
- Iterations per second
- Standard Deviation (if variance was calculated thru something like [Welford's Online Algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm))
Statistics that would not work:
- Median
- 99th percentile
Thoughts on this idea?
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files, tests, or entry points. Start by tracing how Benchee collects samples and computes statistics, then define the configuration option and accumulator-supported metrics described here; done means reduced sample storage while preserving average, iterations per second, and supported standard deviation, without promising median or percentile results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100