https://github.com/sbernard31/benchmark-clients
Command line tool base on https://www.eclipse.org/leshan/ to simulate a fleet of clients
https://github.com/sbernard31/benchmark-clients
java lwm2m lwm2m-client simulator
Last synced: 6 months ago
JSON representation
Command line tool base on https://www.eclipse.org/leshan/ to simulate a fleet of clients
- Host: GitHub
- URL: https://github.com/sbernard31/benchmark-clients
- Owner: sbernard31
- Created: 2018-07-31T09:29:35.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-16T10:26:57.000Z (over 3 years ago)
- Last Synced: 2023-08-14T00:41:30.912Z (almost 3 years ago)
- Topics: java, lwm2m, lwm2m-client, simulator
- Language: Java
- Homepage:
- Size: 77.1 KB
- Stars: 15
- Watchers: 1
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# benchmark-clients
A Command line tool base on https://www.eclipse.org/leshan/ to simulate a fleet of LWM2M clients.
Get the [last version of benchmark-clients-*.jar](https://github.com/sbernard31/benchmark-clients/releases/latest/).
To launch it :
```
`java -jar benchmark-clients-*.jar -u coap://leshan.eclipseprojects.io`
```
**(Please :pray:! Do not use this tool to kill(Dos) the leshan sandbox :sweat_smile:**)
Here is the command option :
```
Usage: leshan-clients-launcher [[-g] [--graphite-url=]
[--graphite-polling-period=]]
[-bfhrV] [-c=]
[-d=] [-e=]
[-i=] [-k=]
[-n=] [-s=] -u=
[-a=]...
Launch several LWM2M clients. CoAP and CoAPs with PSK is supported
-u, --server-url=
URL of the LWM2M Server or LWM2M bootstrap server if
-b option is used, e.g: coap://localhost:5683. Use
coaps to use PSK.
-n, --number-of-client=
Number of clients to simulate.
Default: 1 client.
-s, --start-time=
Time to start all clients in seconds.
Default: number-of-client*3 seconds.
-c, --communication-period=
Number of time between 2 update requests in seconds.
Default: 60 seconds.
-b, --bootstrap Use this option to bootstrap instead of register.
-r, --reconnect-on-update
Try to resume connection when it's possible.
-f, --no-resume Do not try to resume session always do a full
handshake.
-d, --duration=
Duration of the simulation in seconds.
Default: no limit.
-e, --endpoint-pattern=
A String.format pattern used to create the client
endpoint name from this index number.
Default: LESHAN%08d.
-i, --pskid-pattern=
A String.format pattern used to create the psk
identity from this index number.
Default: use --endpoint-pattern.
-k, --pskkey-pattern=
A String.format pattern used to create the psk
identity from this index number. Value must be an
Hexadecimal String.
Default 1234567890ABCDEF%08X
-a, --additional-attributes=
Additional attribute use at registration.
-g, --graphite-report Report to graphite server.
--graphite-url=
Url of graphite server.
Default: "localhost/127.0.0.1:2003".
--graphite-polling-period=
Polling period to push data to graphite in seconds.
Default: 5 seconds.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
```
You can report stats on [graphite](https://graphiteapp.org/).
Using the ugly default UI, this looks like this :

To build it :
```
mvn clean install
```
then run it :
```
java -jar target/benchmark-clients-*-SNAPSHOT-jar-with-dependencies.jar -u coap://leshan.eclipseprojects.io
```