10
10
| noop_layer_disabled | 12 ns |
11
11
| noop_layer_enabled | 25 ns |
12
12
| ot_layer_disabled | 19 ns |
13
- | ot_layer_enabled | 196 ns |
13
+ | ot_layer_enabled | 167 ns |
14
+
15
+ Hardware: Apple M4 Pro
16
+ Total Number of Cores: 14 (10 performance and 4 efficiency)
17
+ | Test | Average time|
18
+ |-----------------------------|-------------|
19
+ | log_no_subscriber | 285 ps |
20
+ | noop_layer_disabled | 8 ns |
21
+ | noop_layer_enabled | 14 ns |
22
+ | ot_layer_disabled | 12 ns |
23
+ | ot_layer_enabled | 186 ns |
14
24
*/
15
25
16
26
use criterion:: { criterion_group, criterion_main, Criterion } ;
@@ -94,7 +104,7 @@ fn benchmark_no_subscriber(c: &mut Criterion) {
94
104
c. bench_function ( "log_no_subscriber" , |b| {
95
105
b. iter ( || {
96
106
error ! (
97
- name = "CheckoutFailed" ,
107
+ name : "CheckoutFailed" ,
98
108
book_id = "12345" ,
99
109
book_title = "Rust Programming Adventures" ,
100
110
message = "Unable to process checkout."
@@ -120,7 +130,7 @@ fn benchmark_with_ot_layer(c: &mut Criterion, enabled: bool, bench_name: &str) {
120
130
c. bench_function ( bench_name, |b| {
121
131
b. iter ( || {
122
132
error ! (
123
- name = "CheckoutFailed" ,
133
+ name : "CheckoutFailed" ,
124
134
book_id = "12345" ,
125
135
book_title = "Rust Programming Adventures" ,
126
136
message = "Unable to process checkout."
@@ -137,10 +147,10 @@ fn benchmark_with_noop_layer(c: &mut Criterion, enabled: bool, bench_name: &str)
137
147
c. bench_function ( bench_name, |b| {
138
148
b. iter ( || {
139
149
error ! (
140
- name = "CheckoutFailed" ,
150
+ name : "CheckoutFailed" ,
141
151
book_id = "12345" ,
142
152
book_title = "Rust Programming Adventures" ,
143
- "Unable to process checkout."
153
+ message = "Unable to process checkout."
144
154
) ;
145
155
} ) ;
146
156
} ) ;
0 commit comments