-
Notifications
You must be signed in to change notification settings - Fork 502
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
test: Modify perf tests to pass event name correctly to avoid string allocation #2762
test: Modify perf tests to pass event name correctly to avoid string allocation #2762
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2762 +/- ##
=====================================
Coverage 79.6% 79.6%
=====================================
Files 123 123
Lines 23034 23034
=====================================
+ Hits 18352 18356 +4
+ Misses 4682 4678 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -88,7 +88,7 @@ fn main() { | |||
|
|||
fn test_log() { | |||
error!( | |||
name = "CheckoutFailed", | |||
name : "CheckoutFailed", |
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.
in case anyone wondering what this is doing - previous "name" was just any attribute, so the string has to copied to new heap memory.
now, name is part of metadata of tracing
, and is &static
. Otel stores it as event_name, which is static &str
, so allocation and copying is gone.
| ot_layer_enabled | 167 ns | | ||
|
||
Hardware: Apple M4 Pro | ||
Total Number of Cores: 14 (10 performance and 4 efficiency) |
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.
It'd be great if you could also add the CPU speed as part of the details.
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.
I need to find that detail. @lalitb do you know?
Follow up to #2760