File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ when conversion is feasible. Otherwise stored as
4747` opentelemetry::logs::AnyValue::String ` . This avoids unnecessary string
4848allocation when values can be represented in their original types.
4949
50+ - perf - small perf improvement by avoiding string allocation of ` target `
51+
5052## 0.28.1
5153
5254Released 2025-Feb-12
Original file line number Diff line number Diff line change 1010 | noop_layer_disabled | 12 ns |
1111 | noop_layer_enabled | 25 ns |
1212 | ot_layer_disabled | 19 ns |
13- | ot_layer_enabled | 167 ns |
13+ | ot_layer_enabled | 155 ns |
1414
1515 Hardware: Apple M4 Pro
1616 Total Number of Cores: 14 (10 performance and 4 efficiency)
2020 | noop_layer_disabled | 8 ns |
2121 | noop_layer_enabled | 14 ns |
2222 | ot_layer_disabled | 12 ns |
23- | ot_layer_enabled | 186 ns |
23+ | ot_layer_enabled | 130 ns |
2424*/
2525
2626use criterion:: { criterion_group, criterion_main, Criterion } ;
Original file line number Diff line number Diff line change @@ -189,8 +189,7 @@ where
189189
190190 let mut log_record = self . logger . create_log_record ( ) ;
191191
192- // TODO: Fix heap allocation
193- log_record. set_target ( target. to_string ( ) ) ;
192+ log_record. set_target ( target) ;
194193 log_record. set_event_name ( name) ;
195194 log_record. set_severity_number ( severity) ;
196195 log_record. set_severity_text ( metadata. level ( ) . as_str ( ) ) ;
You can’t perform that action at this time.
0 commit comments