Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,17 @@ public Mono<Void> 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<Void> sendRequest() {
HttpRequest request = new HttpRequest(HttpMethod.GET, options.getUrl());
return httpPipeline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public boolean isSync() {

private static class SemiColonSplitter implements IParameterSplitter {
public List<String> split(String value) {
return Arrays.asList(value.split(";"));
return Arrays.asList(value.split(";"));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public abstract class PerfStressTest<TOptions extends PerfStressOptions> {
protected final HttpClient httpClient;
protected final Iterable<HttpPipelinePolicy> policies;

private static final AtomicInteger globalParallelIndex = new AtomicInteger();
private static final AtomicInteger GLOBAL_PARALLEL_INDEX = new AtomicInteger();
protected final int parallelIndex;

/**
Expand All @@ -51,7 +51,7 @@ public abstract class PerfStressTest<TOptions extends PerfStressOptions> {
*/
public PerfStressTest(TOptions options) {
this.options = options;
this.parallelIndex = globalParallelIndex.getAndIncrement();
this.parallelIndex = GLOBAL_PARALLEL_INDEX.getAndIncrement();

final SslContext sslContext;

Expand Down Expand Up @@ -144,7 +144,7 @@ public void recordAndStartPlayback() {
runSyncOrAsync();

startRecordingAsync().block();

testProxyPolicy.setRecordingId(recordingId);
testProxyPolicy.setMode("record");

Expand Down