Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add concurrent load test for feed generating query #43

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Aivean
Copy link
Collaborator

@Aivean Aivean commented May 12, 2022

Add simple test that simulates concurrent feed generation requests like:

SELECT site_id FROM user_sites WHERE user_id = ?;

SELECT * from posts where site_id in (?) order by commented_at desc limit ?, ?;

Usage example (100 concurrent users, offset 1-8 pages, run for 20 seconds):

npm run load-test -- -u 100 -p 8 -t 20

Additional changes: moved all utility scripts into backend/utils directory.

@@ -7,9 +7,10 @@
"start:dev": "npx tsc && NODE_ENV=development node build/app.js",
"build": "npx tsc",
"start:production": "NODE_ENV=production node build/app.js",
"migration:dev": "NODE_ENV=development node migrations.js",
"migration:dev": "NODE_ENV=development node utils/migrations.js",
"migration:production": "NODE_ENV=production node migrations.js",
Copy link
Collaborator

@mugabe mugabe May 13, 2022

Choose a reason for hiding this comment

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

Path to migrations.js should be changed for production also.
And testing that the production docker container (or docker-compose.local.yml configuration) works correctly required, as utils dir might not be included now.

@Aivean Aivean changed the title Add concurrent load test for feed generating query WIP: Add concurrent load test for feed generating query May 14, 2022
@Aivean Aivean marked this pull request as draft May 18, 2022 15:19
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