Rework and publish metric benchmarks #8000
Open
+256
−295
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned #7986, I've been working through some ideas to improve the performance of the metric SDK under high contention.
To illustrate the impact on these changes, I've reworked
MetricsBenchmarkto include dimensions that impact record performance. The set of dimensions that play some role include:That forms 2222225 = 320 unique test cases, which is just impractical. And so I narrow it down to the most meaningful dimensions:
With these eliminated, were down to 222*5 = 40 test cases, which is more reasonable.
I'm also using this as an opportunity to finish what @tylerbenson started and get into the routine of running benchmarks on each change on dedicated hardwhere, and publishing the results on https://open-telemetry.github.io/opentelemetry-java/benchmarks/
The unfinished problem was that the benchmarks in this repo are micro benchmarks. Their not very meaningful for end users and may even do more harm then good. What we need is a curated set of somewhat high level benchmarks, intentionally built to demonstrate / report on the types of performance characteristics that matter to end users.
This revamped
MetricRecordBenchmarkis the first of these. I will followup with dedicated benchmarks for other areas:For reference, here are the results of the revamped
MetricRecordBenchmarkon my machine: