Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to interpret the metrics of Locust?

I found no detail about the Number of users to simulate and Hatch rate in the locust documentation.

What is the relation between the two parameters?

If I have 20 clients, of each will post 1000 requests/second to the server, how should I set the two parameters to test the server?

like image 845
Zelong Avatar asked May 22 '17 07:05

Zelong


People also ask

Why do locusts test performance?

Locust is an easy to use, scriptable and scalable performance testing tool. You define the behaviour of your users in regular Python code, instead of being stuck in a UI or restrictive domain specific language. This makes Locust infinitely expandable and very developer friendly.

What is swarm rate in Locust?

When you start the load test with this configuration, locust will spawn 2 new users for every second until it fulfils the total number of users to simulate (which is 20 in this case). After 10 seconds, you will have a swarm of 20 simulated users. To control the no.

What is median response time in Locust?

For less than 400 users running, we have a Median response time of 2ms and a 95% percentile response of 5ms. For less than 450-675 users running, we have a Median response time of 3ms and a 95% percentile response of 7ms.

How do you test a locust?

The target of locust is load-testing websites and checking the number of concurrent users a system can handle. During a locust test, a swarm of locusts will attack the target i.e website. The behavior of each locust is configurable and the swarming process is monitored from a web UI in real time.


1 Answers

"Hatch rate" is how quickly you want to spawn the users.

Example:

"Number of users to simulate" = 20

"Hatch rate" (user spawned / second) = 2

When you start the load test with this configuration, locust will spawn 2 new users for every second until it fulfils the total number of users to simulate (which is 20 in this case). After 10 seconds, you will have a swarm of 20 simulated users.

To control the no. of request per second, you will need to set the max_wait accordingly.

like image 58
Davidlowjw Avatar answered Oct 11 '22 13:10

Davidlowjw