LOAD TEST KIT (Week 11)
DMILZE EdTech · Full-Stack Development with AI

Only load test apps you own, on your own computer or a staging copy you control.

Option A: k6
  k6 run -e BASE_URL=http://localhost:3000 load-test.js

Option B: no install (autocannon, via npm)
  npx autocannon -c 50 -d 60 http://localhost:3000/api/orders

Steps
1. Build and start the app in production mode: npm run build, then npm run start.
2. Run a baseline test and copy p50, p95, requests per second and error rate into Load_Test_Results.xlsx.
3. Find the slowest endpoint. Use EXPLAIN ANALYZE in PostgreSQL on its main query.
4. Fix one thing (an index, caching, fewer queries, pagination).
5. Run the same test again and record the "after" numbers.
