Skip to content

Commit 2822711

Browse files
committed
Allowing forbidden API usage
These benchmarks exist to show why the APIs are forbidden
1 parent fa1b8bd commit 2822711

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

internal-api/src/jmh/java/datadog/trace/util/StringReplacementBenchmark.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package datadog.trace.util;
22

3+
import de.thetaphi.forbiddenapis.SuppressForbidden;
34
import java.util.regex.Pattern;
45
import org.openjdk.jmh.annotations.Benchmark;
56
import org.openjdk.jmh.annotations.Fork;
@@ -30,6 +31,7 @@
3031
@Warmup(iterations = 2)
3132
@Measurement(iterations = 3)
3233
@Threads(8)
34+
@SuppressForbidden
3335
public class StringReplacementBenchmark {
3436
static final String[] INPUTS = {
3537
"foo",

internal-api/src/jmh/java/datadog/trace/util/StringSplitBenchmark.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package datadog.trace.util;
22

3+
import de.thetaphi.forbiddenapis.SuppressForbidden;
34
import java.util.regex.Pattern;
45
import org.openjdk.jmh.annotations.Benchmark;
56
import org.openjdk.jmh.annotations.Fork;
@@ -41,6 +42,7 @@
4142
@Measurement(iterations = 3)
4243
@Threads(8)
4344
@State(Scope.Benchmark)
45+
@SuppressForbidden
4446
public class StringSplitBenchmark {
4547
public enum TestString {
4648
EMPTY(""),

0 commit comments

Comments
 (0)