aws-xray-agent-benchmark/src/jmh/java/com/amazonaws/xray/agent/benchmark/AwsSdkBenchmark.java [47:62]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            jettyServer = SimpleJettyServer.create(PORT, PATH);
        }

        @TearDown(Level.Trial)
        public void cleanup() {
            try {
                jettyServer.stop();
            } catch (Exception e) {
                e.printStackTrace();
            } finally {
                jettyServer.destroy();
            }
        }
    }

    @Benchmark
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-xray-agent-benchmark/src/jmh/java/com/amazonaws/xray/agent/benchmark/HttpDownstreamBenchmark.java [44:69]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            jettyServer = SimpleJettyServer.create(PORT, PATH);
        }

        @TearDown(Level.Trial)
        public void cleanup() {
            try {
                jettyServer.stop();
            } catch (Exception e) {
                e.printStackTrace();
            } finally {
                jettyServer.destroy();
            }
        }
    }

    /**
     * This benchmark tests the time it takes to make a HTTP request with an Apache client wrapped in an X-Ray Segment.
     * It can be tested with or without the agent running on the JVM. The segment is necessary because we only want to
     * test the performance change introduced by the instrumentation of the Apache client, and without the segment we
     * get CMEs, which do not accurately represent the instrumentation latency.
     *
     * As something of a hack, we add an additional JVM arg pointing to an agent config file in the resources directory
     * that disables the agent's instrumentation of servlet requests. This prevents us from attempting to start a new
     * segment when the Jetty server handles these HTTP requests, which would add latency.
     */
    @Benchmark
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



