aws-xray-recorder-sdk-benchmark/tst/main/java/com/amazonaws/xray/strategy/sampling/CentralizedSamplingStrategyBenchmark.java [65:85]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            samplingRequest = new SamplingRequest("roleARN", "arn:aws:execute-api:us-east-1:1234566789012:qsxrty/test",
                    "serviceName", "hostName", "someMethod", "https://hostName.com", null, null);
        }
    }

    // Benchmark default sampling rules on a sampling Request that matches the rules.
    @Benchmark
    public boolean defaultSamplingRuleBenchmark(DefaultSamplingRulesState state) {
        return state.samplingStrategy.shouldTrace(state.samplingRequest).isSampled();
    }

    // Benchmark a no match sampling rule on a sampling request.
    @Benchmark
    public boolean noSampleSamplingBenchmark(NoSampleSamplingRulesState state) {
        return state.samplingStrategy.shouldTrace(state.samplingRequest).isSampled();
    }

    // Convenience main entry-point
    public static void main(String[] args) throws RunnerException {
        Options opt = new OptionsBuilder()
            .addProfiler("gc")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-xray-recorder-sdk-benchmark/tst/main/java/com/amazonaws/xray/strategy/sampling/LocalizedSamplingStrategyBenchmark.java [65:85]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            samplingRequest = new SamplingRequest("roleARN", "arn:aws:execute-api:us-east-1:1234566789012:qsxrty/test",
                    "serviceName", "hostName", "someMethod", "https://hostName.com", null, null);
        }
    }

    // Benchmark default sampling rules on a sampling Request that matches the rules.
    @Benchmark
    public boolean defaultSamplingRuleBenchmark(DefaultSamplingRulesState state) {
        return state.samplingStrategy.shouldTrace(state.samplingRequest).isSampled();
    }

    // Benchmark a no match sampling rule on a sampling request.
    @Benchmark
    public boolean noSampleSamplingBenchmark(NoSampleSamplingRulesState state) {
        return state.samplingStrategy.shouldTrace(state.samplingRequest).isSampled();
    }

    // Convenience main entry-point
    public static void main(String[] args) throws RunnerException {
        Options opt = new OptionsBuilder()
            .addProfiler("gc")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



