Load testing
To keep several cores busy you need concurrent requests, at least as many as WORKERS. With hey:
hey -n 100 -c 8 "http://127.0.0.1:3000/stress?number=40"
With k6, save this as stress.js:
import http from 'k6/http';
export const options = { vus: 8, duration: '60s' };
export default function () {
http.get('http://127.0.0.1:3000/stress?number=40');
}
and run k6 run stress.js.
With plain curl (8 parallel requests):
for i in $(seq 8); do curl -s "http://127.0.0.1:3000/stress?number=40" & done; wait
Lower or raise number to tune how long each request keeps a core busy.