-
Notifications
You must be signed in to change notification settings - Fork 506
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
Update metric benchmarks #1907
Update metric benchmarks #1907
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1907 +/- ##
=====================================
Coverage 75.0% 75.0%
=====================================
Files 122 122
Lines 20289 20289
=====================================
+ Hits 15221 15222 +1
+ Misses 5068 5067 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing these. Should we also add the benchmarks results as done here -
opentelemetry-rust/opentelemetry/benches/anyvalue.rs
Lines 6 to 10 in ad990d6
// Results: | |
// CreateOTelValueString 1-2 ns | |
// CreateOTelAnyValueString 15 ns | |
// CreateOTelValueInt 1-2 ns | |
// CreateOTelAnyValueInt 15 ns |
also add the machine configuration used for testing.
| NoAttributes | 1.1616 ns | | ||
| AddWithInlineStaticAttributes | 13.296 ns | | ||
| AddWithStaticArray | 1.1612 ns | | ||
| AddWithDynamicAttributes | 110.40 ns | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This benchmark method runs much faster when run in isolation. It takes around 80 ns instead of 110 ns.
Changes
iter_batched
method to generate the dynamic attributes before each iteration