Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
bed4e03
Edit pass on Azure Identity README (#31767)
scottaddie Oct 27, 2022
dd8dbe1
Validate LRO Retry behavior for failure service responses (#31725)
samvaity Oct 27, 2022
8027d1f
update CODEOWNERS (#31780)
jeet1995 Oct 27, 2022
83e44b6
bump version to newest (#31766)
azure-sdk Oct 27, 2022
6807e41
updated idempotency logic (#31790)
juntuchen-msft Oct 28, 2022
0c54646
Sync eng/common directory with azure-sdk-tools for PR 4543 (#31794)
azure-sdk Oct 28, 2022
91aa36c
Issue 31716 no class def found error for com.nimbusds.jose.shaded.jso…
rujche Oct 28, 2022
f711924
fix scs sources cannot be appended to Kafka binder context (#31715)
yiliuTo Oct 28, 2022
31bb791
Otel plugins: minor logging improvements (#31786)
Oct 28, 2022
1019336
Fix `java - spring - tests` pipeline (#31795)
Oct 28, 2022
980f59e
[Identity] Documentation improvements (#31798)
pvaneck Oct 28, 2022
e7a8c6c
Make UserPrincipalManager#getRoles more robust. (#31803)
rujche Oct 31, 2022
083da9c
Fix pipeline `java - jdbc - tests` failure (#31837)
Oct 31, 2022
e208802
Add dummy resource to make java-spring-tests pipeline more stable (#3…
fangjian0423 Oct 31, 2022
04a7b53
Add HTTP Logging Explanation (#31823)
alzimmermsft Oct 31, 2022
1fd4c2f
Add CI Test Run using Latest JDK (#31003)
alzimmermsft Oct 31, 2022
2bb61cb
Fixed servicebus default proxy configuration bug (#31832)
ki1729 Oct 31, 2022
6e3a415
Ensuring Websocket upgrade request's hostname is the same as the HTTP…
anuchandy Oct 31, 2022
5bdf09a
Tracing for eventhubs consumer and batch processor (#31197)
Oct 31, 2022
854846a
Dump out correlation id without verbose logging for resource deployme…
azure-sdk Oct 31, 2022
de18cdf
Fixed spell check errors for Metrics Advisor (#31791)
samvaity Oct 31, 2022
dcf4e39
Fixed eventhubs default proxy configuration bug (#31833)
ki1729 Oct 31, 2022
18b160b
Adding default rule support for subscription creation (#31804)
ki1729 Oct 31, 2022
c690b51
update MSAL version (#31847)
billwert Oct 31, 2022
403a14b
Merge spring-cloud-azure_4.4.1 to main (#31857)
Netyyyy Nov 1, 2022
b56a4e7
updated codeowners (#31862)
ostoliarova-ee Nov 1, 2022
94e61ff
[CredScan] Refactor CredScan suppression to Java FakeCredentialInTest…
mssfang Nov 1, 2022
906f0ad
Change how List Blobs Perf Creates Blobs and minor changes to Perf Co…
alzimmermsft Nov 1, 2022
17607fe
Fix query plan cache race condition (#31859)
kushagraThapar Nov 1, 2022
360b485
Address UX study feedback (#31831)
ki1729 Nov 1, 2022
665be2b
Update baseline file (#31866)
sima-zhu Nov 1, 2022
ca36d96
Quick fix - typos (#31868)
ki1729 Nov 1, 2022
44fb398
fix modifier access for e2e tests. (#31848)
g2vinay Nov 1, 2022
aa9c16e
Sync eng/common directory with azure-sdk-tools for PR 4544 (#31854)
azure-sdk Nov 1, 2022
c9a8a5d
Add support for Azure SAS credentials (#31851)
ki1729 Nov 1, 2022
56ec6a5
target new version (#31853)
azure-sdk Nov 1, 2022
fd63df6
Remove Void Responses from being Eagerly Read (#31865)
alzimmermsft Nov 1, 2022
cde1d21
Fixing range passed in for ShareFileRange (#31828)
ibrahimrabab Nov 1, 2022
140da1a
Extend to 3 hours (#31867)
sima-zhu Nov 1, 2022
856b619
update spring reference (#31876)
Netyyyy Nov 2, 2022
c36eeb6
Fix typo (#31809)
geagin Nov 2, 2022
0896907
Handle helm version modifiers in stress test min version check (#31878)
azure-sdk Nov 2, 2022
00f39d1
mgmt, prepare ARG 1.0.0 (#31880)
weidongxu-microsoft Nov 2, 2022
ca2ef39
Increment versions for resourcegraph releases (#31884)
azure-sdk Nov 2, 2022
81b62b8
Merge branch 'main' into moary/sync-code-to-spring-boot-3
moarychan Nov 2, 2022
893dcdc
Re-sync the external dependencies for Spring Boot 3.0.0-RC1 and Sprin…
moarychan Nov 2, 2022
2f573d8
Override the properties due to the failure of the azure-core module, …
moarychan Nov 2, 2022
f71e1e9
Merge branch 'feature/spring-boot-3' of github.com:Azure/azure-sdk-fo…
moarychan Nov 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/sdk/batch/ @gingi @paterasMSFT @dpwatrous

# PRLabel: %Communication
/sdk/communication/ @JianpingChen @ankitarorabit @minnieliu @Azure/azure-sdk-communication-code-reviewers
/sdk/communication/

# PRLabel: %Communication - Calling Server
/sdk/communication/sdk/communication/azure-communication-callingserver/ @minwoolee-msft
Expand All @@ -53,7 +53,7 @@
/sdk/communication/sdk/communication/azure-communication-callautomation/ @juntuchen-msft @cochi2

# PRLabel: %Communication - Chat
/sdk/communication/sdk/communication/azure-communication-chat/ @JianpingChen @ankitarorabit @minnieliu @Azure/azure-sdk-communication-code-reviewers
/sdk/communication/sdk/communication/azure-communication-chat/ @ankitarorabit @minnieliu @Azure/azure-sdk-communication-code-reviewers

# PRLabel: %Communication - Identity
/sdk/communication/azure-communication-identity/ @Azure/acs-identity-sdk @petrsvihlik @AikoBB @maximrytych-ms @ostoliarova-msft
Expand All @@ -62,7 +62,7 @@
/sdk/communication/azure-communication-common/ @Azure/acs-identity-sdk @petrsvihlik @AikoBB @maximrytych-ms @ostoliarova-msft

# PRLabel: %Communication - Network Traversal
/sdk/communication/sdk/communication/azure-communication-networktraversal/ @JianpingChen @ankitarorabit @minnieliu @Azure/azure-sdk-communication-code-reviewers
/sdk/communication/sdk/communication/azure-communication-networktraversal/ @ankitarorabit @minnieliu @Azure/azure-sdk-communication-code-reviewers

# PRLabel: %Communication - Phone Numbers
/sdk/communication/azure-communication-phonenumbers/ @miguhern @whisper6284 @lucasrsant @RoyHerrod @danielav7
Expand All @@ -86,11 +86,11 @@
/sdk/core/azure-core-tracing-opentelemetry/ @samvaity @alzimmermsft @trask @lmolkova

# PRLabel: %Cosmos
/sdk/cosmos/ @kushagraThapar @FabianMeiswinkel @kirankumarkolli @xinlian12 @milismsft @aayush3011 @simorenoh
/sdk/cosmos/ @kushagraThapar @FabianMeiswinkel @kirankumarkolli @xinlian12 @milismsft @aayush3011 @simorenoh @jeet1995
# PRLabel: %azure-spring
/sdk/cosmos/azure-spring-data-cosmos/ @kushagraThapar @FabianMeiswinkel @backwind1233 @chenrujun @hui1110 @netyyyy @saragluna @stliu @yiliuTo @xinlian12 @moarychan @aayush3011 @simorenoh @fangjian0423
/sdk/cosmos/azure-spring-data-cosmos/ @kushagraThapar @FabianMeiswinkel @backwind1233 @chenrujun @hui1110 @netyyyy @saragluna @stliu @yiliuTo @xinlian12 @moarychan @aayush3011 @simorenoh @fangjian0423 @jeet1995
# PRLabel: %azure-spring
/sdk/cosmos/azure-spring-data-cosmos-test/ @kushagraThapar @FabianMeiswinkel @backwind1233 @chenrujun @hui1110 @netyyyy @saragluna @stliu @yiliuTo @xinlian12 @moarychan @aayush3011 @simorenoh @fangjian0423
/sdk/cosmos/azure-spring-data-cosmos-test/ @kushagraThapar @FabianMeiswinkel @backwind1233 @chenrujun @hui1110 @netyyyy @saragluna @stliu @yiliuTo @xinlian12 @moarychan @aayush3011 @simorenoh @fangjian0423 @jeet1995

# PRLabel: %Load Testing
/sdk/loadtestservice/ @Harshan01 @abranj1219
Expand Down
47 changes: 43 additions & 4 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
"sdk/parents/azure-client-sdk-parent/**",
"sdk/parents/azure-sdk-parent/**",
"sdk/parents/azure-data-sdk-parent/**",
"sdk/metricsadvisor/azure-ai-metricsadvisor/**",
"sdk/personalizer/azure-ai-personalizer/**",
"sdk/purview/azure-analytics-purview-administration/**",
"sdk/quantum/azure-quantum-jobs/**",
Expand All @@ -177,7 +176,6 @@
"sdk/schemaregistry/azure-data-schemaregistry-apacheavro/**",
"sdk/servicebus/build/**",
"sdk/spring/scripts/**",
"sdk/servicebus/azure-messaging-servicebus/**",
"sdk/spring/spring-cloud-azure-actuator/**",
"sdk/spring/spring-cloud-azure-actuator-autoconfigure/**",
"sdk/spring/spring-cloud-azure-integration-tests/**",
Expand Down Expand Up @@ -258,6 +256,7 @@
"words": [
"adal",
"amqp",
"Apim",
"AUHours",
"autoscale",
"autodetection",
Expand Down Expand Up @@ -630,8 +629,20 @@
"filename": "sdk/spring/CHANGELOG.md",
"words": [
"AADB",
"JPMS",
"nimbusds"
"JPMS"
]
},
{
"filename": "sdk/spring/README.md",
"words": [
"Dcheckstyle",
"Dcodesnippet",
"Djacoco",
"Drevapi",
"Dskip",
"Dspotbugs",
"Pdev",
""
]
},
{
Expand Down Expand Up @@ -672,6 +683,34 @@
"RAGRS",
"saoid"
]
},
{
"filename": "sdk/metricsadvisor/azure-ai-metricsadvisor/**",
"words": [
"APIV",
"bacf",
"alertme",
"adwiki",
"howto",
"bpfdfee",
"deduped",
"dedupe",
"POSTGRE",
"dgfbbbb",
"gdgfbbbb",
"dvhkl",
"yufrjo",
"kldn",
"dccf"
]
},
{
"filename": "sdk/servicebus/azure-messaging-servicebus/**",
"words": [
"Conniey",
"qpid",
"unretriable"
]
}
],
"allowCompoundWords": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Arrays;
import java.util.Collections;
import java.util.concurrent.CompletableFuture;

/**
* The Base Performance Test class for API based Perf Tests.
*
* @param <TOptions> the performance test options to use while running the test.
*/
public abstract class ApiPerfTestBase<TOptions extends PerfStressOptions> extends PerfTestBase<TOptions> {
Expand All @@ -46,6 +47,7 @@ public abstract class ApiPerfTestBase<TOptions extends PerfStressOptions> extend

/**
* Creates an instance of the Http Based Performance test.
*
* @param options the performance test options to use while running the test.
* @throws IllegalStateException if an errors is encountered with building ssl context.
*/
Expand All @@ -58,7 +60,7 @@ public ApiPerfTestBase(TOptions options) {
recordPlaybackHttpClient = createRecordPlaybackClient(options);
testProxy = options.getTestProxies().get(parallelIndex % options.getTestProxies().size());
testProxyPolicy = new TestProxyPolicy(testProxy);
policies = Arrays.asList(testProxyPolicy);
policies = Collections.singletonList(testProxyPolicy);
} else {
recordPlaybackHttpClient = null;
testProxy = null;
Expand All @@ -79,7 +81,7 @@ private static HttpClient createHttpClient(PerfStressOptions options) {

reactor.netty.http.client.HttpClient nettyHttpClient =
reactor.netty.http.client.HttpClient.create()
.secure(sslContextSpec -> sslContextSpec.sslContext(sslContext));
.secure(sslContextSpec -> sslContextSpec.sslContext(sslContext));

return new NettyAsyncHttpClientBuilder(nettyHttpClient).build();
} catch (SSLException e) {
Expand Down Expand Up @@ -127,21 +129,20 @@ private static reactor.netty.http.client.HttpClient createRecordPlaybackClient(P
}

/**
* Attempts to configure a ClientBuilder using reflection. If a ClientBuilder does not follow the standard convention,
* it can be configured manually using the "httpClient" and "policies" fields.
* Attempts to configure a ClientBuilder using reflection. If a ClientBuilder does not follow the standard
* convention, it can be configured manually using the "httpClient" and "policies" fields.
*
* @param clientBuilder The client builder.
* @throws IllegalStateException If reflective access to get httpClient or addPolicy methods fail.
*/
protected void configureClientBuilder(HttpTrait<?> clientBuilder) {
if (httpClient != null || policies != null) {
if (httpClient != null) {
clientBuilder.httpClient(httpClient);
}
if (httpClient != null) {
clientBuilder.httpClient(httpClient);
}

if (policies != null) {
for (HttpPipelinePolicy policy : policies) {
clientBuilder.addPolicy(policy);
}
if (policies != null) {
for (HttpPipelinePolicy policy : policies) {
clientBuilder.addPolicy(policy);
}
}
}
Expand All @@ -163,35 +164,45 @@ public Mono<Void> runAllAsync(long endNanoTime) {
lastCompletionNanoTime = 0;
long startNanoTime = System.nanoTime();

return Flux.just(1)
.repeat()
.flatMap(i -> runTestAsync(), 1)
.doOnNext(v -> {
completedOperations += v;
return Flux.generate(sink -> {
if (System.nanoTime() < endNanoTime) {
sink.next(1);
} else {
sink.complete();
}
})
.flatMap(ignored -> {
if (System.nanoTime() < endNanoTime) {
return runTestAsync();
} else {
return Mono.just(0);
}
}, 1)
.doOnNext(result -> {
completedOperations += result;
lastCompletionNanoTime = System.nanoTime() - startNanoTime;
})
.takeWhile(i -> System.nanoTime() < endNanoTime)
.then();
}

/**
* Indicates how many operations were completed in a single run of the test.
* Good to be used for batch operations.
* Indicates how many operations were completed in a single run of the test. Good to be used for batch operations.
*
* @return the number of successful operations completed.
*/
abstract int runTest();

/**
* Indicates how many operations were completed in a single run of the async test.
* Good to be used for batch operations.
* Indicates how many operations were completed in a single run of the async test. Good to be used for batch
* operations.
*
* @return the number of successful operations completed.
*/
abstract Mono<Integer> runTestAsync();

/**
* Stops playback tests.
*
* @return An empty {@link Mono}.
*/
public Mono<Void> stopPlaybackAsync() {
Expand Down Expand Up @@ -245,6 +256,7 @@ private Mono<Void> startPlaybackAsync() {

/**
* Records responses and starts tests in playback mode.
*
* @return
*/
@Override
Expand All @@ -253,16 +265,16 @@ Mono<Void> postSetupAsync() {

// Make one call to Run() before starting recording, to avoid capturing one-time setup like authorization requests.
return runSyncOrAsync()
.then(startRecordingAsync())
.then(Mono.defer(() -> {
.then(startRecordingAsync())
.then(Mono.defer(() -> {
testProxyPolicy.setRecordingId(recordingId);
testProxyPolicy.setMode("record");
return Mono.empty();
}))
.then(runSyncOrAsync())
.then(stopRecordingAsync())
.then(startPlaybackAsync())
.then(Mono.defer(() -> {
.then(runSyncOrAsync())
.then(stopRecordingAsync())
.then(startPlaybackAsync())
.then(Mono.defer(() -> {
testProxyPolicy.setRecordingId(recordingId);
testProxyPolicy.setMode("playback");
return Mono.empty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,38 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import java.util.stream.IntStream;
import java.util.stream.Stream;

/**
* Represents the main program class which reflectively runs and manages the performance tests.
*/
public class PerfStressProgram {
private static final int NANOSECONDS_PER_SECOND = 1_000_000_000;

private static int getCompletedOperations(PerfTestBase<?>[] tests) {
return Stream.of(tests).mapToInt(perfStressTest -> Long.valueOf(perfStressTest.getCompletedOperations()).intValue()).sum();
private static long getCompletedOperations(PerfTestBase<?>[] tests) {
long completedOperations = 0;
for (PerfTestBase<?> test : tests) {
completedOperations += test.getCompletedOperations();
}

return completedOperations;
}

private static double getOperationsPerSecond(PerfTestBase<?>[] tests) {
return IntStream.range(0, tests.length)
.mapToDouble(i -> tests[i].getCompletedOperations() / (((double) tests[i].lastCompletionNanoTime) / NANOSECONDS_PER_SECOND))
.sum();
double operationsPerSecond = 0.0D;
for (PerfTestBase<?> test : tests) {
double temp = test.getCompletedOperations() / (((double) test.lastCompletionNanoTime) / NANOSECONDS_PER_SECOND);
if (!Double.isNaN(temp)) {
operationsPerSecond += temp;
}
}

return operationsPerSecond;
}

/**
Expand Down Expand Up @@ -187,7 +199,7 @@ public static void run(Class<?> testClass, PerfStressOptions options) {
if (!options.isNoCleanup()) {
cleanupStatus = printStatus("=== Cleanup ===", () -> ".", false, false);

Flux.just(tests).flatMap(t -> t.cleanupAsync()).blockLast();
Flux.just(tests).flatMap(PerfTestBase::cleanupAsync).blockLast();
}
}
}
Expand Down Expand Up @@ -222,11 +234,11 @@ public static void runTests(PerfTestBase<?>[] tests, boolean sync, int parallel,

long endNanoTime = System.nanoTime() + ((long) durationSeconds * 1000000000);

int[] lastCompleted = new int[]{0};
long[] lastCompleted = new long[]{0};
Disposable progressStatus = printStatus(
"=== " + title + " ===" + System.lineSeparator() + "Current\t\tTotal\t\tAverage", () -> {
int totalCompleted = getCompletedOperations(tests);
int currentCompleted = totalCompleted - lastCompleted[0];
long totalCompleted = getCompletedOperations(tests);
long currentCompleted = totalCompleted - lastCompleted[0];
double averageCompleted = getOperationsPerSecond(tests);

lastCompleted[0] = totalCompleted;
Expand All @@ -236,10 +248,16 @@ public static void runTests(PerfTestBase<?>[] tests, boolean sync, int parallel,
try {
if (sync) {
ForkJoinPool forkJoinPool = new ForkJoinPool(parallel);
forkJoinPool.submit(() -> {
IntStream.range(0, parallel).parallel().forEach(i -> tests[i].runAll(endNanoTime));
}).get();
List<Callable<Integer>> operations = new ArrayList<>(parallel);
for (PerfTestBase<?> test : tests) {
operations.add(() -> {
test.runAll(endNanoTime);
return 1;
});
}

forkJoinPool.invokeAll(operations, (durationSeconds * 1000L) + 100L, TimeUnit.MILLISECONDS);
forkJoinPool.shutdown();
} else {
// Exceptions like OutOfMemoryError are handled differently by the default Reactor schedulers. Instead of terminating the
// Flux, the Flux will hang and the exception is only sent to the thread's uncaughtExceptionHandler and the Reactor
Expand All @@ -251,13 +269,13 @@ public static void runTests(PerfTestBase<?>[] tests, boolean sync, int parallel,
});

Flux.range(0, parallel)
.parallel()
.runOn(Schedulers.boundedElastic())
.flatMap(i -> tests[i].runAllAsync(endNanoTime))
.parallel(parallel)
.runOn(Schedulers.parallel())
.flatMap(i -> tests[i].runAllAsync(endNanoTime), false, Math.min(parallel, 1000 / parallel), 1)
.then()
.block();
}
} catch (InterruptedException | ExecutionException e) {
} catch (InterruptedException e) {
System.err.println("Error occurred when submitting jobs to ForkJoinPool. " + System.lineSeparator() + e);
e.printStackTrace(System.err);
throw new RuntimeException(e);
Expand All @@ -270,7 +288,7 @@ public static void runTests(PerfTestBase<?>[] tests, boolean sync, int parallel,

System.out.println("=== Results ===");

int totalOperations = getCompletedOperations(tests);
long totalOperations = getCompletedOperations(tests);
if (totalOperations == 0) {
throw new IllegalStateException("Zero operations has been completed");
}
Expand Down
Loading