dependabot[bot] 949da0529f
Bump path-parse from 1.0.6 to 1.0.7 in /benchmark
Bumps [path-parse]( from 1.0.6 to 1.0.7.
- [Release notes](
- [Commits](

- dependency-name: path-parse
  dependency-type: indirect

Signed-off-by: dependabot[bot] <>
2021-09-01 15:48:20 +00:00
.gitignore Adding first protobuf message exchange 2020-09-17 17:14:47 +02:00 Switching test loading from Artillery to home-grown test 2020-09-18 17:01:45 +02:00
index.ts FEATURE: users can now login via an openID client 2021-07-30 15:43:46 +02:00
package-lock.json Bump path-parse from 1.0.6 to 1.0.7 in /benchmark 2021-09-01 15:48:20 +00:00
package.json Bump ws from 7.3.1 to 7.4.6 in /benchmark 2021-06-17 09:25:14 +00:00 Moved benchmark to its own directory and added multicore testing + a README 2020-09-11 09:56:05 +02:00
yarn.lock Bump path-parse from 1.0.6 to 1.0.7 in /benchmark 2021-09-01 15:48:20 +00:00

Load testing

Load testing is performed with Artillery.


cd benchmark
npm install

Running the tests (on one core):

cd benchmark
npm run start

You can adapt the socketio-load-test.yaml file to increase/decrease load.

Default settings are:

    - duration: 20
      arrivalRate: 2

which means: during 20 seconds, 2 users will be added every second (peaking at 40 simultaneous users).

Important: don't go above 40 simultaneous users for Artillery, otherwise, it is Artillery that will fail to run the tests properly. To know, simply run "top". The "node" process for Artillery should never reach 100%.

Reports are generated in artillery_output.html.

Multicore tests

You will want to test with Artillery running on multiple cores.

You can use


This will trigger 4 Artillery instances in parallel.

Beware, the report generated is generated for only one instance.

How to test, what to track?

While testing, you can check:

  • CPU load of WorkAdventure API node process (it should not reach 100%)
  • Get metrics at the end of the run: http://api.workadventure.localhost/metrics
    In particular, look for:
    # HELP nodejs_eventloop_lag_max_seconds The maximum recorded event loop delay.
    # TYPE nodejs_eventloop_lag_max_seconds gauge
    nodejs_eventloop_lag_max_seconds 23.991418879
    This is the maximum time it took Node to process an event (you need to restart node after each test to reset this counter)
  • Generate a profiling using "node --prof" by switching the command in docker-compose.yaml:
        #command: yarn dev
        command: yarn run profile
    Read on how to generate a profile.