title: Gatling: Understanding rampUsersPerSec(minTPS) to maxTPS during seconds
body: <p>I am checking a scala code for gatling where they inject transactions for the period of 20 seconds.</p>
  
  <pre><code>/*TPS = Transaction Per Second */   
    val minTps = Integer.parseInt(System.getProperty("minTps", "1"))
    val maxTps = Integer.parseInt(System.getProperty("maxTps", "5"))
  
    var rampUsersDurationInMinutes =Integer.parseInt(System.getProperty("rampUsersDurationInMinutes", "20"))
    setUp(scn.inject(
      rampUsersPerSec(minTps) to maxTps during (rampUsersDurationInMinutes seconds)).protocols(tcilProtocol))
  </code></pre>
  
  <hr>
  
  <p>The same question was asked <a href="https://stackoverflow.com/questions/51739593/what-does-rampuserspersec-function-really-do">What does rampUsersPerSec function really do?</a> but never answered. I think that <strong><em>ideally</em></strong> the the graph should be looking like that.  </p>
  
  <blockquote>
    <p>could you please confirm if I correctly understood
    <strong>rampUsersPerSec</strong>?</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/FDr1N.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FDr1N.png" alt="enter image description here"></a></p>
  
  <ul>
  <li>block (ramp) 1 = 4 users  +1</li>
  <li>block (ramp) 2 = 12 users +2 </li>
  <li>block (ramp) 3 = 24 users +3</li>
  <li>block (ramp) 4 = 40 users +4</li>
  <li>block (ramp) 5 = 60 users +5 </li>
  </ul>
  
  <p>The results show that the requests count is indeed 60. Is my calculation correct?</p>
  
  <pre><code>---- Global Information --------------------------------------------------------
  &gt; request count                                         60 (OK=38     KO=22    )
  &gt; min response time                                   2569 (OK=2569   KO=60080 )
  &gt; max response time                                  61980 (OK=61980  KO=61770 )
  &gt; mean response time                                 42888 (OK=32411  KO=60985 )
  &gt; std deviation                                      20365 (OK=18850  KO=505   )
  &gt; response time 50th percentile                      51666 (OK=32143  KO=61026 )
  &gt; response time 75th percentile                      60903 (OK=48508  KO=61371 )
  &gt; response time 95th percentile                      61775 (OK=61886  KO=61725 )
  &gt; response time 99th percentile                      61974 (OK=61976  KO=61762 )
  &gt; mean requests/sec                                  0.741 (OK=0.469  KO=0.272 )
  ---- Response Time Distribution ------------------------------------------------
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/l4gDT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/l4gDT.png" alt="enter image description here"></a></p>