I put the duration inside the test as part of options construct. I then ran k6 command line with --VUS 100
checks.....................: 100.00% ✓ 82609 ✗ 0
data_received..............: 912 MB 15 MB/s
data_sent..................: 6.3 MB 105 kB/s
http_req_blocked...........: avg=130.44µs min=1.2µs med=2.5µs max=107.95ms p(90)=3.5µs p(95)=5.3µs
http_req_connecting........: avg=87.88µs min=0s med=0s max=73.97ms p(90)=0s p(95)=0s
http_req_duration..........: avg=72.33ms min=70.18ms med=72.35ms max=161.4ms p(90)=73.13ms p(95)=73.54ms
http_req_receiving.........: avg=70.47µs min=20.1µs med=59.4µs max=28.52ms p(90)=93.3µs p(95)=113µs
http_req_sending...........: avg=13.56µs min=4.6µs med=10µs max=1.54ms p(90)=23.4µs p(95)=28.9µs
http_req_tls_handshaking...: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
http_req_waiting...........: avg=72.25ms min=70.07ms med=72.27ms max=161.33ms p(90)=73.04ms p(95)=73.43ms
http_reqs..................: 82609 1376.813489/s
iteration_duration.........: avg=72.55ms min=70.26ms med=72.45ms max=184.1ms p(90)=73.23ms p(95)=73.66ms
iterations.................: 82609 1376.813489/s
vus........................: 100 min=100 max=100
vus_max....................: 100 min=100 max=100
Note that http_reqs is 1376.8/sec (is this the RPS?)
Then I ran a test where I put a stage with 1m and 100 VU’s and got totally different throughput
checks.....................: 100.00% ✓ 41263 ✗ 0
data_received..............: 456 MB 7.6 MB/s
data_sent..................: 3.1 MB 52 kB/s
http_req_blocked...........: avg=174.74µs min=1.2µs med=2.5µs max=72.62ms p(90)=3.5µs p(95)=5.7µs
http_req_connecting........: avg=171.29µs min=0s med=0s max=72.53ms p(90)=0s p(95)=0s
http_req_duration..........: avg=72.33ms min=70.16ms med=72.29ms max=359.61ms p(90)=73.18ms p(95)=73.69ms
http_req_receiving.........: avg=73.79µs min=22.7µs med=62µs max=9.3ms p(90)=94.8µs p(95)=111.6µs
http_req_sending...........: avg=14.08µs min=5µs med=10.1µs max=2.81ms p(90)=25.3µs p(95)=30.3µs
http_req_tls_handshaking...: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
http_req_waiting...........: avg=72.25ms min=70.11ms med=72.2ms max=359.55ms p(90)=73.09ms p(95)=73.59ms
http_reqs..................: 41263 687.715514/s
iteration_duration.........: avg=72.6ms min=70.23ms med=72.38ms max=359.69ms p(90)=73.29ms p(95)=73.86ms
iterations.................: 41263 687.715514/s
vus........................: 99 min=2 max=99
vus_max....................: 100 min=100 max=100
Note that http req is 687.7/sec
Questions:
-
Why is the RPS so different in these cases? I am assuming they are just different ways of expressing the same thing?
-
Is that rate value mentioned in the output next to http_reqs the actual RPS? This is not mentioned in the docs and also the rate next to the iterations
-
If I run k6 tests across 2 different machines and route the output to influxdb, and visualize the RPS results through grafana - can that be considered an accurate representation of RPS generated against the API?