node load testing-check 1

node load testing-check

$ loadtest http://localhost:7357/ -t 20 -c 10 --keepalive --rps 2000
...
Requests per second: 1950

Percentage of the requests served within a certain time
  50%      1 ms
  90%      2 ms
  95%      2 ms
  99%      7 ms
 100%      20 ms (longest request)

Here is what the above code is Doing:
1. We’re using the loadtest module to test our server.
2. We’re telling loadtest to send 2000 requests per second to our server.
3. We’re telling loadtest to send 10 concurrent requests to our server.
4. We’re telling loadtest to keep the connection alive.
5. We’re telling loadtest to send 20 requests in total.

Similar Posts