File tree Expand file tree Collapse file tree
dd-trace-core/src/jmh/java/datadog/trace/common/writer/ddagent Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package datadog .trace .common .writer .ddagent ;
22
3- import datadog .utf8 .GeneratedTagUtf8Cache ;
4- import datadog .utf8 .GenerationalUtf8Cache ;
5- import datadog .utf8 .SimpleUtf8Cache ;
63import java .nio .charset .StandardCharsets ;
74import java .util .concurrent .ThreadLocalRandom ;
85import org .openjdk .jmh .annotations .Benchmark ;
96import org .openjdk .jmh .annotations .BenchmarkMode ;
107import org .openjdk .jmh .annotations .Mode ;
118import 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
You can’t perform that action at this time.
0 commit comments