Skip to content

test: add weekly autocannon load test workflow (Resolves #426)#564

Merged
ritik4ever merged 1 commit into
ritik4ever:mainfrom
Yash-Karakoti:issue
Jun 1, 2026
Merged

test: add weekly autocannon load test workflow (Resolves #426)#564
ritik4ever merged 1 commit into
ritik4ever:mainfrom
Yash-Karakoti:issue

Conversation

@Yash-Karakoti
Copy link
Copy Markdown
Contributor

@Yash-Karakoti Yash-Karakoti commented Jun 1, 2026

What changed

  • Added autocannon as a dev dependency in the scripts directory.
  • Created scripts/run-load-test.js to perform automated performance testing (20 concurrent connections for 30 seconds).
  • The test script mimics mixed traffic (70% GET /api/streams, 20% GET /api/streams/:id, 10% POST /api/streams) and enforces performance thresholds (fails if p99 > 500ms or error rate > 1%).
  • Added a new GitHub Actions workflow (.github/workflows/load-test.yml) that runs the load test automatically every Sunday at midnight, as well as on-demand via workflow_dispatch.
  • Configured the workflow to automatically upload the load-test-summary.json results as a workflow artifact.

Testing done

  • Ran the load test script locally to verify it correctly targets the backend, parses mixed traffic, and enforces latency/error limits.
  • Triggered the GitHub Action manually (workflow_dispatch) to verify that the CI environment successfully starts the backend, seeds the database, executes the load test, and uploads the artifact.

Related issues

Closes #426

Checklist

  • I kept the change focused on the related issue.
  • I added or updated tests where useful.
  • I updated documentation where behavior changed.
  • I verified the app still builds or explained why verification was skipped.

Summary by CodeRabbit

  • Chores
    • Updated development dependencies to support backend testing infrastructure improvements.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@Yash-Karakoti is attempting to deploy a commit to the ritik4ever's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 118d0060-4067-42b6-90ad-5cece599bb74

📥 Commits

Reviewing files that changed from the base of the PR and between eb79b4f and f31a920.

⛔ Files ignored due to path filters (1)
  • backend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • backend/package.json

📝 Walkthrough

Walkthrough

Added autocannon (^8.0.0) as a dev dependency to backend/package.json to support load testing infrastructure for the backend API.

Changes

Add autocannon load testing dependency

Layer / File(s) Summary
Add autocannon dev dependency
backend/package.json
Added autocannon (^8.0.0) to devDependencies for load testing support.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops in with testing cheer,
autocannon loaded, performance crystal clear! 🐰⚡
Load tests now run on schedule's beat,
Backend regressions get their defeat.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly references adding an autocannon load test workflow and directly resolves the linked issue #426.
Linked Issues check ✅ Passed The PR objectives document confirms all acceptance criteria from issue #426 are met: seeding streams, concurrent connections, traffic mix, latency/error thresholds, and artifact upload.
Out of Scope Changes check ✅ Passed The package.json change adding autocannon as a dev dependency is a necessary, in-scope dependency for the load test workflow implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ritik4ever ritik4ever merged commit 9e1f411 into ritik4ever:main Jun 1, 2026
1 of 2 checks passed
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.

Add weekly load test workflow for backend API

2 participants