title: Calculating the throughput (requests/sec) and plot it
body: <p>I'm using JMeter client to test the throughtput of a certain workload (PHP+MySQL, 1 page) on a certain server. Basically I'm doing a "capacity test" with an increasing number of threads over the time.</p>
  
  <p>I installed the "Statistical Aggregate Report" JMeter plugin and this was the result (ignore the "Response time" line):
  <img src="https://i.stack.imgur.com/GkqUS.png" alt="enter image description here"></p>
  
  <p>At the same time I used the "Simple Data Writer" listener to write a log file ("JMeter.csv"). Then I tried to "manually" calculate the throughput for every second of the test.</p>
  
  <p>Each line of "JMeter.csv" has this format:</p>
  
  <pre><code>timestamp       elaspedtime   responsecode   success   bytes
  1385731020607   42            200            true      325
  ...             ...           ...            ...       ...
  </code></pre>
  
  <p>The timestamp is referred to the time when the request is made by the client, and not when the request is served by the server. So I simply did: <strong>totaltime = timestamp + elapsedtime</strong>.</p>
  
  <p>In the next step I converted the <em>totaltime</em> to a date format, like: <strong>13:17:01</strong>.</p>
  
  <p>I have more than 14K samples and with Excel I was able to do this quickly.</p>
  
  <p>Then I counted how many samples there were for each second. Example:</p>
  
  <pre><code>totaltime    samples (requestsServed/second)
  13:17:01     204    
  13:17:02     297
  ...          ...
  </code></pre>
  
  <p>When I tried to plot the results I obtained the following graphic:
  <img src="https://i.stack.imgur.com/zQpdG.png" alt="enter image description here"></p>
  
  <p>As you can notice it is far different from the first graphic.</p>
  
  <p>Given that the first graphic is correct, what is the mistake of my formula/procedure to calculate the throughput?</p>