Scalability tests#9
Open
iishiishii wants to merge 5 commits into
Open
Conversation
Contributor
iishiishii
commented
May 10, 2026
- Added the rest of test cases with approx no. requests in the comment
- Compliance peak test is heavy, can be more gentle with a lower no. users
- Fixed complexity range 8-20
- Added tests to runk6 script
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Adds the remaining scalability test scenarios (curiosity, compliance mid/peak/tail, auditing BAU, research), introduces shared query helpers (queryUserById, pollPendingRequests, queryUserResults), broadens photo complexity ranges, adds a pre-poll sleep in the submitter, and wires all new scenarios into runk6.sh.
Changes:
- New k6 scenarios
2_curiosity.js,4_compliance_mid.js,5_compliance_peak.js,6_compliance_tail.js,7_auditing_bau.js,8_research.jswith mixed submitter/reader/auditor profiles. - Querier refactor: extracted
pollPendingRequests, addedqueryUserByIdandqueryUserResults; submitter now sleeps 5s before polling. - Photo complexity upper bound widened to 20;
runk6.shruns all new scenarios.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scalability/bin/runk6.sh | Adds runs for new scenarios (but references nonexistent 2_compliance). |
| scalability/workflows/submitter.js | Adds 5s pre-poll sleep and decrements timeout. |
| scalability/workflows/querier.js | Adds queryUserById, pollPendingRequests, queryUserResults; refactors batch helper. |
| scalability/data/photo.js | Raises complexity upper bound to 20 for heavy/normal. |
| scalability/3_compliance_early.js | Removes unused photoComplexity setup field. |
| scalability/2_curiosity.js | New curiosity scenario with sustained auditor read burst. |
| scalability/4_compliance_mid.js | New mid-compliance ramping scenario. |
| scalability/5_compliance_peak.js | New peak scenario with heavy submitters/readers/auditors. |
| scalability/6_compliance_tail.js | New tail-off compliance scenario. |
| scalability/7_auditing_bau.js | New BAU auditing scenario with normal+backlog submitters. |
| scalability/8_research.js | New research scan scenario over all customer requests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+88
to
+91
| let customer = | ||
| data.customers[Math.floor(Math.random() * data.customers.length)]; | ||
| for (let i = 0; i < data.customers.length; i++) { | ||
| customer = data.customers[i]; |
Comment on lines
+96
to
+105
| export function pollPendingRequests(hostUrl, customer) { | ||
| let res = queryRequestsList(hostUrl, customer, { status: "pending" }); | ||
| if (res.status === 200 && Array.isArray(res.json())) { | ||
| let pending = res.json(); | ||
| for (let i = 0; i < pending.length; i++) { | ||
| queryRequestById(hostUrl, customer, pending[i].id); | ||
| sleep(0.5); | ||
| } | ||
| } | ||
| } |
Co-authored-by: Copilot <copilot@github.com>
Comment on lines
+80
to
+94
| export function auditBatch(data) { | ||
| let host = BASE_URL.endsWith("/") ? BASE_URL.slice(0, -1) : BASE_URL; | ||
|
|
||
| // Batch queries across all clients | ||
| queryBatchUserResults(host, data.customers); | ||
| sleep(1); | ||
|
|
||
| // Per-user queries across all customers | ||
| for (let i = 0; i < data.customers.length; i++) { | ||
| const customer = data.customers[i]; | ||
| queryUserResults(host, customer, data.userIds); | ||
| sleep(1); | ||
| } | ||
| sleep(1); | ||
| } |
| // Moderate batch queries | ||
| let batchSize = randomIntBetween(4, data.customers.length); | ||
| let startIdx = Math.floor( | ||
| Math.random() * (data.customers.length - batchSize), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.