From 4149f0d2ddd4ac09e7283749d4ce7a2ea7f2343a Mon Sep 17 00:00:00 2001 From: Mindaugas Vinkelis Date: Thu, 7 Nov 2024 11:18:16 +0200 Subject: [PATCH] Remove Counter/Add benchmark for delta temporality --- opentelemetry-sdk/benches/metric.rs | 52 +---------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/opentelemetry-sdk/benches/metric.rs b/opentelemetry-sdk/benches/metric.rs index 77de656bb8..bc67631fb3 100644 --- a/opentelemetry-sdk/benches/metric.rs +++ b/opentelemetry-sdk/benches/metric.rs @@ -132,19 +132,14 @@ fn bench_counter(view: Option>, temporality: &str) -> (SharedReade fn counters(c: &mut Criterion) { let (_, cntr) = bench_counter(None, "cumulative"); - let (_, cntr2) = bench_counter(None, "delta"); + // let (_, cntr2) = bench_counter(None, "delta"); let (_, cntr3) = bench_counter(None, "cumulative"); let mut group = c.benchmark_group("Counter"); group.bench_function("AddNoAttrs", |b| b.iter(|| cntr.add(1, &[]))); - group.bench_function("AddNoAttrsDelta", |b| b.iter(|| cntr2.add(1, &[]))); - group.bench_function("AddOneAttr", |b| { b.iter(|| cntr.add(1, &[KeyValue::new("K", "V")])) }); - group.bench_function("AddOneAttrDelta", |b| { - b.iter(|| cntr2.add(1, &[KeyValue::new("K1", "V1")])) - }); group.bench_function("AddThreeAttr", |b| { b.iter(|| { cntr.add( @@ -157,18 +152,6 @@ fn counters(c: &mut Criterion) { ) }) }); - group.bench_function("AddThreeAttrDelta", |b| { - b.iter(|| { - cntr2.add( - 1, - &[ - KeyValue::new("K2", "V2"), - KeyValue::new("K3", "V3"), - KeyValue::new("K4", "V4"), - ], - ) - }) - }); group.bench_function("AddFiveAttr", |b| { b.iter(|| { cntr.add( @@ -183,20 +166,6 @@ fn counters(c: &mut Criterion) { ) }) }); - group.bench_function("AddFiveAttrDelta", |b| { - b.iter(|| { - cntr2.add( - 1, - &[ - KeyValue::new("K5", "V5"), - KeyValue::new("K6", "V6"), - KeyValue::new("K7", "V7"), - KeyValue::new("K8", "V8"), - KeyValue::new("K9", "V9"), - ], - ) - }) - }); group.bench_function("AddTenAttr", |b| { b.iter(|| { cntr.add( @@ -216,25 +185,6 @@ fn counters(c: &mut Criterion) { ) }) }); - group.bench_function("AddTenAttrDelta", |b| { - b.iter(|| { - cntr2.add( - 1, - &[ - KeyValue::new("K10", "V10"), - KeyValue::new("K11", "V11"), - KeyValue::new("K12", "V12"), - KeyValue::new("K13", "V13"), - KeyValue::new("K14", "V14"), - KeyValue::new("K15", "V15"), - KeyValue::new("K16", "V16"), - KeyValue::new("K17", "V17"), - KeyValue::new("K18", "V18"), - KeyValue::new("K19", "V19"), - ], - ) - }) - }); const MAX_DATA_POINTS: i64 = 2000; let mut max_attributes: Vec = Vec::new();