Skip to content

Commit

Permalink
added sleep function for regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie-Microsoft committed Jul 31, 2023
1 parent 72e01b7 commit 917e9c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions regression-tests/msal-node/client-credential/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ const lastResourceRequest = {
await confidentialClientApplication.acquireTokenByClientCredential(request);
}

const sleep = (ms) => {
return new Promise(resolve => setTimeout(resolve, ms));
}

const suite = new benchmark.Suite();
suite
.add("ConfidentialClientApplication#acquireTokenByClientCredential-fromCache-resourceIsFirstItemInTheCache", async () => {
Expand Down

1 comment on commit 917e9c4

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Benchmark.js Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 0.1.

Benchmark suite Current: 917e9c4 Previous: 3f40e16 Ratio
ConfidentialClientApplication#acquireTokenByClientCredential-fromCache-resourceIsFirstItemInTheCache 565672 ops/sec (±2.62%) 127640 ops/sec (±3.08%) 0.23
ConfidentialClientApplication#acquireTokenByClientCredential-fromCache-resourceIsLastItemInTheCache 372179 ops/sec (±5.70%) 131818 ops/sec (±2.34%) 0.35

This comment was automatically generated by workflow using github-action-benchmark.

CC: @bgavrilMS @Robbie-Microsoft

Please sign in to comment.