remove version scan task from ci
MODIFY
.circleci/config.yml
.circleci/config.yml
@@ -172,24 +172,6 @@ jobs:
- store_artifacts:
path: ./reports
- scan_versions:
- <<: *defaults
- steps:
- - checkout
-
- - restore_cache:
- # Reset the cache approx every release
- keys:
- - dd-trace-java-version-scan-{{ checksum "dd-trace-java.gradle" }}
-
- - run:
- name: Verify Version Scan
- command: GRADLE_OPTS="-Ddatadog.forkedMaxHeapSize=4G -Ddatadog.forkedMinHeapSize=64M" ./gradlew verifyVersionScan --parallel --stacktrace --no-daemon --max-workers=8
-
- - save_cache:
- key: dd-trace-java-version-scan-{{ checksum "dd-trace-java.gradle" }}
- paths: ~/.gradle
-
muzzle:
<<: *defaults
steps:
@@ -290,13 +272,6 @@ workflows:
tags:
only: /.*/
- - scan_versions:
- requires:
- - build
- filters:
- branches:
- ignore: master
-
- muzzle:
requires:
- build

ADD
dd-java-agent/benchmark-integration/play-perftest/jetty-perftest.gradle
+dependencies {
+ compile project(':dd-trace-api')
+ compile project(':dd-java-agent:benchmark-integration')
+ compile deps.opentracing
+
+ compile group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.1.v20170120'
+ compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.4.1.v20170120'
+}
+
+jar {
+ manifest {
+ attributes(
+ "Main-Class": "datadog.perftest.jetty.JettyPerftest"
+ )
+ }
+}

ADD
dd-java-agent/benchmark-integration/play-perftest/src/main/java/datadog/perftest/Worker.java
+package datadog.perftest;
+
+import datadog.trace.api.Trace;
+import io.opentracing.Span;
+import io.opentracing.util.GlobalTracer;
+import java.util.concurrent.TimeUnit;
+
+public class Worker {
+
+ @Trace
+ /** Simulate work for the give number of milliseconds. */
+ public static void doWork(final long workTimeMS) {
+ final Span span = GlobalTracer.get().activeSpan();
+ if (span != null) {
+ span.setTag("work-time", workTimeMS);
+ span.setTag("info", "interesting stuff");
+ span.setTag("additionalInfo", "interesting stuff");
+ }
+
+ final long doneTimestamp = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(workTimeMS);
+ while (System.nanoTime() < doneTimestamp) {
+ // busy-wait to simulate work
+ }
+ }
+}

ADD
dd-java-agent/benchmark-integration/play-perftest/src/main/java/datadog/perftest/jetty/JettyPerftest.java
+package datadog.perftest.jetty;
+
+import datadog.perftest.Worker;
+import datadog.trace.api.Trace;
+import io.opentracing.Span;
+import io.opentracing.util.GlobalTracer;
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+
+public class JettyPerftest {
+ private static final int PORT = 8080;
+ private static final String PATH = "/work";
+ private static final Server jettyServer = new Server(PORT);
+ private static final ServletContextHandler servletContext = new ServletContextHandler();
+
+ public static void main(final String[] args) throws Exception {
+ servletContext.addServlet(PerfServlet.class, PATH);
+ jettyServer.setHandler(servletContext);
+ jettyServer.start();
+
+ Runtime.getRuntime()
+ .addShutdownHook(
+ new Thread() {
+ @Override
+ public void run() {
+ try {
+ jettyServer.stop();
+ jettyServer.destroy();
+ } catch (final Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+ });
+ }
+
+ @WebServlet
+ public static class PerfServlet extends HttpServlet {
+ @Override
+ protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
+ throws ServletException, IOException {
+ if (request.getParameter("error") != null) {
+ throw new RuntimeException("some sync error");
+ }
+ final String workVal = request.getParameter("workTimeMS");
+ long workTimeMS = 0l;
+ if (null != workVal) {
+ workTimeMS = Long.parseLong(workVal);
+ }
+ scheduleWork(workTimeMS);
+ response.getWriter().print("Did " + workTimeMS + "ms of work.");
+ }
+
+ @Trace
+ private void scheduleWork(final long workTimeMS) {
+ final Span span = GlobalTracer.get().activeSpan();
+ if (span != null) {
+ span.setTag("work-time", workTimeMS);
+ span.setTag("info", "interesting stuff");
+ span.setTag("additionalInfo", "interesting stuff");
+ }
+ if (workTimeMS > 0) {
+ Worker.doWork(workTimeMS);
+ }
+ }
+ }
+}

remove version scan task from ci