diff --git a/common/perf-test-core/src/main/java/com/azure/perf/test/core/HttpPipelineOptions.java b/common/perf-test-core/src/main/java/com/azure/perf/test/core/HttpPipelineOptions.java index 6ba9b238f8dc..25418d931366 100644 --- a/common/perf-test-core/src/main/java/com/azure/perf/test/core/HttpPipelineOptions.java +++ b/common/perf-test-core/src/main/java/com/azure/perf/test/core/HttpPipelineOptions.java @@ -14,8 +14,8 @@ public class HttpPipelineOptions extends PerfStressOptions { @Parameter(names = { "-u", "--url" }, description = "URL to fetch", required = true) private URL url; - @Parameter(names = { "--first-run-extra-requests" }, description = "Extra requests to send on first run. " + - "Simulates SDKs which require extra requests (like authentication) on first API call.") + @Parameter(names = { "--first-run-extra-requests" }, description = "Extra requests to send on first run. " + + "Simulates SDKs which require extra requests (like authentication) on first API call.") private int firstRunExtraRequests = 0; /** diff --git a/common/perf-test-core/src/main/java/com/azure/perf/test/core/HttpPipelineTest.java b/common/perf-test-core/src/main/java/com/azure/perf/test/core/HttpPipelineTest.java index 70adb35a5ebc..ea98ab7a774e 100644 --- a/common/perf-test-core/src/main/java/com/azure/perf/test/core/HttpPipelineTest.java +++ b/common/perf-test-core/src/main/java/com/azure/perf/test/core/HttpPipelineTest.java @@ -57,12 +57,17 @@ public Mono runAsync() { if (firstRun) { firstRun = false; return sendRequest().repeat(options.getFirstRunExtraRequests()).then(); - } - else { + } else { return sendRequest(); } } + /** + * Sends a GET request to the URL provided in the {@link HttpPipelineOptions options} given to this object's + * constructor. + * + * @return An empty {@link Mono} + */ public Mono sendRequest() { HttpRequest request = new HttpRequest(HttpMethod.GET, options.getUrl()); return httpPipeline diff --git a/common/perf-test-core/src/main/java/com/azure/perf/test/core/PerfStressOptions.java b/common/perf-test-core/src/main/java/com/azure/perf/test/core/PerfStressOptions.java index 7bc70c3e74eb..745959cd2a3c 100644 --- a/common/perf-test-core/src/main/java/com/azure/perf/test/core/PerfStressOptions.java +++ b/common/perf-test-core/src/main/java/com/azure/perf/test/core/PerfStressOptions.java @@ -128,7 +128,7 @@ public boolean isSync() { private static class SemiColonSplitter implements IParameterSplitter { public List split(String value) { - return Arrays.asList(value.split(";")); + return Arrays.asList(value.split(";")); } } } diff --git a/common/perf-test-core/src/main/java/com/azure/perf/test/core/PerfStressTest.java b/common/perf-test-core/src/main/java/com/azure/perf/test/core/PerfStressTest.java index 6c5e4db83652..fa55f11cf9f2 100644 --- a/common/perf-test-core/src/main/java/com/azure/perf/test/core/PerfStressTest.java +++ b/common/perf-test-core/src/main/java/com/azure/perf/test/core/PerfStressTest.java @@ -41,7 +41,7 @@ public abstract class PerfStressTest { protected final HttpClient httpClient; protected final Iterable policies; - private static final AtomicInteger globalParallelIndex = new AtomicInteger(); + private static final AtomicInteger GLOBAL_PARALLEL_INDEX = new AtomicInteger(); protected final int parallelIndex; /** @@ -51,7 +51,7 @@ public abstract class PerfStressTest { */ public PerfStressTest(TOptions options) { this.options = options; - this.parallelIndex = globalParallelIndex.getAndIncrement(); + this.parallelIndex = GLOBAL_PARALLEL_INDEX.getAndIncrement(); final SslContext sslContext; @@ -144,7 +144,7 @@ public void recordAndStartPlayback() { runSyncOrAsync(); startRecordingAsync().block(); - + testProxyPolicy.setRecordingId(recordingId); testProxyPolicy.setMode("record");