File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,23 @@ fn criterion_benchmark(c: &mut Criterion) {
16
16
fn attributes_creation ( c : & mut Criterion ) {
17
17
c. bench_function ( "CreateOTelValueString" , |b| {
18
18
b. iter ( || {
19
- let _v = black_box ( Value :: String ( "value1" . into ( ) ) ) ;
19
+ let _v = black_box ( Value :: String ( String :: from ( "value1" ) . into ( ) ) ) ;
20
20
} ) ;
21
21
} ) ;
22
22
23
23
c. bench_function ( "CreateOTelAnyValueString" , |b| {
24
+ b. iter ( || {
25
+ let _v = black_box ( AnyValue :: String ( String :: from ( "value1" ) . into ( ) ) ) ;
26
+ } ) ;
27
+ } ) ;
28
+
29
+ c. bench_function ( "CreateOTelValueStaticStr" , |b| {
30
+ b. iter ( || {
31
+ let _v = black_box ( Value :: String ( "value1" . into ( ) ) ) ;
32
+ } ) ;
33
+ } ) ;
34
+
35
+ c. bench_function ( "CreateOTelAnyValueStaticStr" , |b| {
24
36
b. iter ( || {
25
37
let _v = black_box ( AnyValue :: String ( "value1" . into ( ) ) ) ;
26
38
} ) ;
You can’t perform that action at this time.
0 commit comments