Skip to content

Commit 34bbea3

Browse files
committed
test: Pass eventname correctly to avoid string alloc in perf tests
1 parent f013b3d commit 34bbea3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

opentelemetry-sdk/benches/log_exporter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ fn exporter_without_future(c: &mut Criterion) {
147147
let logger = provider.logger("benchmark");
148148

149149
c.bench_function("LogExporterWithoutFuture", |b| {
150-
b.iter(|| {
150+
b.iter(|| {
151151
let mut log_record = logger.create_log_record();
152152
let now = now();
153153
log_record.set_observed_timestamp(now);

stress/src/logs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
Hardware: Apple M4 Pro
1212
Total Number of Cores: 14 (10 performance and 4 efficiency)
13-
~40 M/sec
13+
~50 M/sec
1414
~1.1 B/sec (when disabled)
1515
*/
1616

@@ -88,7 +88,7 @@ fn main() {
8888

8989
fn test_log() {
9090
error!(
91-
name = "CheckoutFailed",
91+
name : "CheckoutFailed",
9292
book_id = "12345",
9393
book_title = "Rust Programming Adventures",
9494
message = "Unable to process checkout."

0 commit comments

Comments
 (0)