Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are Benchmark-clients look like the real clients (load and traffic)? #9

Open
allaismail opened this issue Mar 19, 2023 · 5 comments
Open

Comments

@allaismail
Copy link

Hello All,

I would like to do a test on server Leshan; i want know how much of real Leshan clients can managed by one server leshan; that's why I want to know if these clients-benchmark do update resources as though they are real devices in the field (i.e. produce simulated measurements) or just make a connection (registration ...).

Thank you in advance!

Best regards,

@sbernard31
Copy link
Owner

if these clients-benchmark do update resources as though they are real devices

I'm not sure I get this part of the question ?

@allaismail
Copy link
Author

Hi Bernard;

My goal is to test a server's capacity to handle multiple real devices using a simulated Leshan client. However, I believe that the current benchmark only covers the registration process. My question is: what modifications can I make to the code to make the client simulation resemble an actual device?

Best regards
clientbenchmark.txt

@sbernard31
Copy link
Owner

I'm not sure what mean an "actual device".

We start "actual leshan client".
With partial implementation of objects : 0, 1 , 3 and simulated/dummy implementation of objects 5, 9 .

See :

if (secure) {
if (bootstrap) {
initializer.setInstancesForObject(SECURITY, pskBootstrap(serverURI, pskId.getBytes(), pskKey));
initializer.setClassForObject(SERVER, Server.class);
} else {
initializer.setInstancesForObject(SECURITY, psk(serverURI, 123, pskId.getBytes(), pskKey));
initializer.setInstancesForObject(SERVER, new Server(123, lifetimeInSec, BindingMode.U, false));
}
} else {
if (bootstrap) {
initializer.setInstancesForObject(SECURITY, noSecBootstap(serverURI));
initializer.setClassForObject(SERVER, Server.class);
} else {
initializer.setInstancesForObject(SECURITY, noSec(serverURI, 123));
initializer.setInstancesForObject(SERVER, new Server(123, lifetimeInSec, BindingMode.U, false));
}
}
initializer.setDummyInstancesForObject(5, 9);
List<LwM2mObjectEnabler> objects = initializer.createAll();
builder.setObjects(objects);

If your server tries to READ/WRITE some resources of those objects this should work.

If you want more object/instances just add more simulated/dummy ones.
if you want more "real" behavior just implement your own ObjectEnabler.
See :

@allaismail
Copy link
Author

Thank you very much for your help,

I've simulated 100 clients that connect to the Leshan server; and I can read/write/OBS some resources of some objects from the server.
But my question:
Is there any possibility that all clients send all data at the same time to the server each period of time without waiting for the server to request for each client?

Best regards;

@sbernard31
Copy link
Owner

You can try to play with this options :

-s, --start-time=<startTime>
                          Time to start all clients in seconds.
                          Default: number-of-client*3 seconds.

but not sure you will be able to launch all client at same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants