Skip to content

Scalability tests#9

Open
iishiishii wants to merge 5 commits into
mainfrom
scalability-tests
Open

Scalability tests#9
iishiishii wants to merge 5 commits into
mainfrom
scalability-tests

Conversation

@iishiishii
Copy link
Copy Markdown
Contributor

  • 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

iishiishii and others added 3 commits May 6, 2026 10:01
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.js with mixed submitter/reader/auditor profiles.
  • Querier refactor: extracted pollPendingRequests, added queryUserById and queryUserResults; submitter now sleeps 5s before polling.
  • Photo complexity upper bound widened to 20; runk6.sh runs 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 thread scalability/5_compliance_peak.js Outdated
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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

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);
}
Comment thread scalability/6_compliance_tail.js Outdated
// Moderate batch queries
let batchSize = randomIntBetween(4, data.customers.length);
let startIdx = Math.floor(
Math.random() * (data.customers.length - batchSize),
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated no new comments.

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.

2 participants