Perf Test Project
ADD
dd-java-agent-perftests/dd-java-agent-perftests.gradle
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
+ }
+}
+
+apply from: "${rootDir}/gradle/java.gradle"
+
+description = 'dd-java-agent-perftests'
+
+sourceCompatibility = 1.8
+targetCompatibility = 1.8
+
+subprojects { sub ->
+ sub.apply plugin: 'com.github.johnrengelman.shadow'
+ sub.apply from: "${rootDir}/gradle/java.gradle"
+}

ADD
dd-java-agent-perftests/src/main/java/dd/perftest/Worker.java
+package dd.perftest;
+
+public class Worker {
+
+ /** Simulate work for the give number of milliseconds. */
+ public static void doWork(long workTimeMS) {
+ final long doneTimestamp = System.currentTimeMillis() + workTimeMS;
+ while (System.currentTimeMillis() < doneTimestamp) {
+ // busy-wait to simulate work
+ }
+ }
+}

MODIFY
settings.gradle
settings.gradle
@@ -6,6 +6,7 @@ include ':dd-java-agent:benchmark'
include ':dd-java-agent:testing'
include ':dd-java-agent:tooling'
include ':dd-java-agent-ittests'
+include ':dd-java-agent-perftests'
include ':dd-trace-examples:dropwizard-mongo-client'
include ':dd-trace-examples:spring-boot-jdbc'
include ':dd-trace-examples:rest-spark'

Perf Test Project