setUp(scn.inject(rampUsers(9000) over (9 hours)).protocols(httpConf))
However, Gatling does not honor this contract.
Each session creation is logged, and the resulting log file contains 9000 such records, with the first and the last being:
19:13:35.276 [INFO ] SignupSimulation - Session(Signup and daily activity,1...
...
02:43:31.916 [INFO ] SignupSimulation - Session(Signup and daily activity,9000...
--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
Also of note, 9 hours / 7.5 hours is exactly 120% - might that hint at something?
import io.gatling.core.Predef._
import io.gatling.http.Predef.http
import io.gatling.http.protocol.HttpProtocolBuilder
import org.slf4j.{Logger, LoggerFactory}
import scala.concurrent.duration._
class Test extends Simulation {
val logger: Logger = LoggerFactory.getLogger(this.getClass)
val httpConf: HttpProtocolBuilder = http
val scn = scenario("Test").exec({ session => logger.info(session.toString); session })
setUp(scn.inject(rampUsers(9000) over (9 hours)).protocols(httpConf))
}
This code generates a log file, one record per session created, and the following shows that 20 sessions are started each minute:
Alekseis-MBP-2:logs aleksei$ cut -b 1-16 Alekseis-MBP-2.lan.log | uniq -c 19 2017-10-10 13:39 20 2017-10-10 13:40 20 2017-10-10 13:41 20 2017-10-10 13:42 20 2017-10-10 13:43 ...
which means that simulation of 9000 users will finish in 7.5 hours exactly! and it actually does, too.
not in 9 hours as requested.
please run my snippet and let's compare the results.
--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
================================================================================
2017-11-22 20:05:02 360s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=11198 KO=0 )
> Get changes (OK=11198 KO=0 )
---- Get changes ---------------------------------------------------------------
[######################################################################### ] 99%
waiting: 52 / active: 0 / done:11198
================================================================================
================================================================================
2017-11-22 20:05:05 363s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=11250 KO=0 )
> Get changes (OK=11250 KO=0 )
---- Get changes ---------------------------------------------------------------
[##########################################################################]100%
waiting: 0 / active: 0 / done:11250
================================================================================
Simulation mytest.GetChanges completed in 359 secondsParsing log file(s)...Parsing log file(s) doneGenerating reports...
================================================================================---- Global Information --------------------------------------------------------> request count 11250 (OK=11250 KO=0 )> min response time 2 (OK=2 KO=- )> max response time 1530 (OK=1530 KO=- )> mean response time 77 (OK=77 KO=- )> std deviation 168 (OK=168 KO=- )> response time 50th percentile 4 (OK=4 KO=- )> response time 75th percentile 23 (OK=23 KO=- )> response time 95th percentile 493 (OK=493 KO=- )> response time 99th percentile 686 (OK=686 KO=- )> mean requests/sec 31.513 (OK=31.513 KO=- )---- Response Time Distribution ------------------------------------------------> t < 800 ms 11190 ( 99%)> 800 ms < t < 1200 ms 54 ( 0%)> t > 1200 ms 6 ( 0%)> failed 0 ( 0%)================================================================================
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.