What is exact behaviour of ConstantUserPerSec?

Hi I am having hard time understanding what ConstantUserPerSec actually means.
Let’s say I have a scenario which constantly hits http://google.com and checks for the status 200.
If I were to use ConstantUserPerSec(1) for 1 minutes, am I getting a new user every second?
And I am assuming old user will perform a single request and die. Therefore I would expect around 60 requests made to google.

  1. What is the point of creating a new gatling user in terms of server being tested?
  2. What is this useful for?

Thanks,

Yep

And I am assuming old user will perform a single request and die.
Therefore I would expect around 60 requests made to google.

Yep

1) What is the point of creating a new gatling user in terms of server
being tested?

2) What is this useful for?

Your use case is very plain, it's just url bashing. For most advance use
cases, where you want to simulate behavior, you'll want each virtual users
to have specific data, specific paths

Then, load profile is not only about rps, but also concurrent connections
and opening/closing rates. Hitting 1000 rps with 10 connections is very
different from hiiting 1000 rps with 1000 connections.

By default, Gatling users have dedicated connection pools.

*Stéphane Landelle*
*Lead developer*
slandelle@gatling.io

Hi Stéphane,

Thank you very much for the response.

You said following: “Hitting 1000 rps with 10 connections is very different from hiiting 1000 rps with 1000 connections.”

When you use constantUserPerSec we are creating a new connection rather than sharing a connection? I usually run my test by creating many users at once using atOnceUsers and control the throughput using throttle( jumpToRps and holdFor). I am guessing by reusing users we are reusing the connections as well.

Just to confirm when you use constantUserPerSec, we are creating a new user (new connection) every second and when you re-use existing user, you are re-using connections as well.

Thanks,

Mayumi

When you use constantUserPerSec we are creating a new connection rather
than sharing a connection? I usually run my test by creating many users at
once using atOnceUsers and control the throughput using throttle( jumpToRps
and holdFor). I am guessing by reusing users we are reusing the connections
as well.

Yes. But is this really how you should be doing things? Is this a behavior
that matches what really happens on your system?

Just to confirm when you use constantUserPerSec, we are creating a new
user (new connection) every second and when you re-use existing user, you
are re-using connections as well.

Yep