File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -98,10 +98,13 @@ name = "batch_span_processor"
9898harness = false
9999required-features = [" rt-tokio" , " testing" ]
100100
101- [[bench ]]
102- name = " metric"
103- harness = false
104- required-features = [" metrics" ]
101+ # TODO - this fails periodically on CI
102+ # e.g. https://github.com/open-telemetry/opentelemetry-rust/actions/runs/13538892896/job/37835456869
103+ # Work out why, and re-add.
104+ # [[bench]]
105+ # name = "metric"
106+ # harness = false
107+ # required-features = ["metrics"]
105108
106109[[bench ]]
107110name = " log"
Original file line number Diff line number Diff line change @@ -338,16 +338,15 @@ fn benchmark_collect_histogram(b: &mut Bencher, n: usize) {
338338 h. record ( 1 , & [ ] ) ;
339339 }
340340
341- let mut _rm = ResourceMetrics {
341+ let mut rm = ResourceMetrics {
342342 resource : Resource :: builder_empty ( ) . build ( ) ,
343343 scope_metrics : Vec :: new ( ) ,
344344 } ;
345345
346- // TODO - this assertion fails intermittently. Work out why!
347- // b.iter(|| {
348- // let _ = r.collect(&mut rm);
349- // assert_eq!(rm.scope_metrics[0].metrics.len(), n);
350- // })
346+ b. iter ( || {
347+ let _ = r. collect ( & mut rm) ;
348+ assert_eq ! ( rm. scope_metrics[ 0 ] . metrics. len( ) , n) ;
349+ } )
351350}
352351
353352criterion_group ! ( benches, counters, histograms) ;
You can’t perform that action at this time.
0 commit comments