Skip to content

Commit 3c33c38

Browse files
committed
Fixing benchmarks brought over from standalone prototype
1 parent 9b78df7 commit 3c33c38

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

dd-trace-core/src/jmh/java/datadog/trace/common/writer/ddagent/Utf8Benchmark.java

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package datadog.trace.common.writer.ddagent;
22

3-
import datadog.utf8.GeneratedTagUtf8Cache;
4-
import datadog.utf8.GenerationalUtf8Cache;
5-
import datadog.utf8.SimpleUtf8Cache;
63
import java.nio.charset.StandardCharsets;
74
import java.util.concurrent.ThreadLocalRandom;
85
import org.openjdk.jmh.annotations.Benchmark;
96
import org.openjdk.jmh.annotations.BenchmarkMode;
107
import org.openjdk.jmh.annotations.Mode;
118
import org.openjdk.jmh.infra.Blackhole;
129

10+
import datadog.trace.common.writer.ddagent.GenerationalUtf8Cache;
11+
import datadog.trace.common.writer.ddagent.SimpleUtf8CacheTest;
12+
1313
/**
1414
* This benchmark isn't really intended to used to measure throughput, but rather to be used with
1515
* "-prof gc" to check bytes / op.
@@ -79,16 +79,6 @@ public static final byte[] tagUtf8_nocache() {
7979
return tag.getBytes(StandardCharsets.UTF_8);
8080
}
8181

82-
@Benchmark
83-
public static final byte[] tagUtf8_w_generatedCache() {
84-
String tag = nextTag();
85-
86-
byte[] cache = GeneratedTagUtf8Cache.lookup(tag);
87-
if (cache != null) return cache;
88-
89-
return tag.getBytes(StandardCharsets.UTF_8);
90-
}
91-
9282
static final SimpleUtf8Cache TAG_CACHE = new SimpleUtf8Cache();
9383

9484
@Benchmark

0 commit comments

Comments
 (0)