Skip to content

[core-rest-pipeline] WWW-Authenticate challenge perf-stress test#14659

Merged
9 commits merged intoAzure:masterfrom
sadasant:core-rest-pipeline/perf-tests-14633
May 3, 2021
Merged

[core-rest-pipeline] WWW-Authenticate challenge perf-stress test#14659
9 commits merged intoAzure:masterfrom
sadasant:core-rest-pipeline/perf-tests-14633

Conversation

@sadasant
Copy link
Copy Markdown
Contributor

@sadasant sadasant commented Apr 1, 2021

This PR is a draft of how the WWW-Authenticate perf-stress would look.

What this first performance test does:

This initial test only sets up a pipeline that does a service request against a fake server that answers once with a WWW-Authenticate challenge, and the next time with a 200. So, the first request will fail, we'll get a challenge, the challenge will be parsed and another request will be sent afterwards, which will succeed.

To run the test, we call to: npm run perf-test:node -- BearerTokenChallengeAuthenticationPolicyTest --warmup 1 --iterations 1 --parallel 5.

Here's how it looks when it runs:

=== Calling globalSetup() once for (all) the instance(s) of BearerTokenChallengeAuthenticationPolicyTest ===

=== warmup mode, iteration 1. Logs every 1s ===
Current         Total           Average
=== warmup mode, results of iteration 1 ===
Completed 55,001 operations in a weighted-average of 1.00s (55,015.93 ops/s, 0.000 s/op)

=== test mode, iteration 1. Logs every 1s ===
Current         Total           Average
=== test mode, results of iteration 1 ===
Completed 537,426 operations in a weighted-average of 10.00s (53,741.61 ops/s, 0.000 s/op)

Background:

Java's perf-stress for challenges uses the ARM kind of challenges, but on TypeScript our more immediate customer is not ARM, but Container Registry and then Key Vault.

This PR uses a copy of the challenge test we have in the main challenge PR: #13888 (this PR hasn't been merged, the plan is to have it merged by next week). Keep in mind that this PR won't pass CI until #13888 is merged.

The idea with this PR is that, besides perf-stress testing a basic scenario, we can use it as the base for further perf-stress tests for core-rest-pipeline.

Fixes #14633

@sadasant sadasant requested a review from g2vinay April 1, 2021 12:58
@sadasant sadasant self-assigned this Apr 1, 2021
@sadasant sadasant requested a review from jeremymeng April 28, 2021 00:51
Copy link
Copy Markdown
Member

@jeremymeng jeremymeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. /cc @HarshaNalluru for perf-test perspective.

@sadasant sadasant marked this pull request as ready for review May 3, 2021 18:40
}
];

const expiresOn = Date.now() + 5000;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the 5000 be parametrized? Is there value in doing it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No value in doing it at the moment, I think 🤔

Copy link
Copy Markdown
Contributor

@HarshaNalluru HarshaNalluru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking fine!

@ghost
Copy link
Copy Markdown

ghost commented May 3, 2021

Hello @sadasant!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 0b9d82b into Azure:master May 3, 2021
@sadasant sadasant deleted the core-rest-pipeline/perf-tests-14633 branch May 3, 2021 21:58
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[core-rest-pipeline] Add performance tests for challenges

3 participants