0.15.2 • Published 11 months ago

@colyseus/loadtest v0.15.2

Weekly downloads
196
License
MIT
Repository
github
Last release
11 months ago

Demo

asciicast

Usage

Install the tool globally in your system.

npm install -g @colyseus/loadtest
$ colyseus-loadtest --help

Options:
    --endpoint: WebSocket endpoint for all connections (default: ws://localhost:2567)
    --room: room handler name
    --numClients: number of connections to open

Example:
    colyseus-loadtest example/bot.ts --endpoint ws://localhost:2567 --room state_handler

Scripting

You may use either JavaScript or TypeScript for scripting your connections:

See below the methods that are called automatically, if implemented. (They are all optional.)

requestJoinOptions (i)

Should return a plain object containing the options for client connection i to join the room provided as an argument.

onJoin ()

Triggered when the client successfully joins in the room.

onMessage (message)

Triggered when the server sends a message to this client, or broadcasts to everyone.

onStateChange (state)

Triggered when the room state changes in the server-side.

onLeave ()

Triggered when the client leaves the room.

onError (err)

Triggered whenever an error has occurred in the room handler.

License

MIT.

0.15.2

11 months ago

0.15.0

1 year ago

0.15.1

1 year ago

0.14.8

2 years ago

0.15.0-preview.0

2 years ago

0.14.7

3 years ago

0.14.5

3 years ago

0.14.6

3 years ago

0.14.6-alpha.0

3 years ago

0.14.6-alpha.1

3 years ago

0.14.6-alpha.2

3 years ago

0.14.5-alpha.0

3 years ago

0.14.6-alpha.3

3 years ago

0.14.4

3 years ago

0.14.3

3 years ago

0.14.4-alpha.1

3 years ago

0.14.4-alpha.0

3 years ago

0.14.2

3 years ago

0.14.1

3 years ago

0.14.0

4 years ago

0.14.0-alpha.0

4 years ago

0.13.1

4 years ago

0.13.0

4 years ago

0.12.0

4 years ago

0.11.3

5 years ago

0.11.2

5 years ago

0.11.1

5 years ago

0.11.0

5 years ago

0.10.2

5 years ago

0.10.1

5 years ago

0.10.1-alpha.1

5 years ago

0.10.1-alpha.0

5 years ago

0.10.0

5 years ago

0.10.0-alpha.0

5 years ago

0.9.0

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago