From 3e6b905e998181bcbdbb065c2264eed23ec2e8ba Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Wed, 6 Dec 2023 11:25:35 +0800 Subject: [PATCH] fixes broken benchmarks Signed-off-by: Adrian Cole --- .../src/main/java/zipkin2/collector/MetricsBenchmarks.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benchmarks/src/main/java/zipkin2/collector/MetricsBenchmarks.java b/benchmarks/src/main/java/zipkin2/collector/MetricsBenchmarks.java index 420b5c65113..a11b4badb36 100644 --- a/benchmarks/src/main/java/zipkin2/collector/MetricsBenchmarks.java +++ b/benchmarks/src/main/java/zipkin2/collector/MetricsBenchmarks.java @@ -45,8 +45,10 @@ public class MetricsBenchmarks { static final int MEDIUM_SPAN = 1000; static final int SHORT_SPAN = 500; private MeterRegistry registry = new PrometheusMeterRegistry(PrometheusConfig.DEFAULT); - private InMemoryCollectorMetrics inMemoryCollectorMetrics = new InMemoryCollectorMetrics(); - private MicrometerCollectorMetrics micrometerCollectorMetrics = new MicrometerCollectorMetrics(registry); + private InMemoryCollectorMetrics inMemoryCollectorMetrics = new InMemoryCollectorMetrics() + .forTransport("jmh"); + private MicrometerCollectorMetrics micrometerCollectorMetrics = new MicrometerCollectorMetrics(registry) + .forTransport("jmh"); @Benchmark public int incrementBytes_longSpans_inMemory() {