rakyll / hey

HTTP load generator, ApacheBench (ab) replacement
Apache License 2.0
17.63k stars 1.17k forks source link

Status code distribution gives inaccurate stats #227

Open howardjohn opened 3 years ago

howardjohn commented 3 years ago
$ hey -q 0 -z 10s -c 64 http://127.0.0.1:8080/json

Summary:
  Total:        10.0015 secs
  Slowest:      0.0285 secs
  Fastest:      0.0000 secs
  Average:      0.0006 secs
  Requests/sec: 139688.1930

  Total data:   37721457 bytes
  Size/request: 37 bytes

Response time histogram:
  0.000 [1]     |
  0.003 [989640]        |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.006 [7958]  |
  0.009 [1873]  |
  0.011 [324]   |
  0.014 [125]   |
  0.017 [23]    |
  0.020 [4]     |
  0.023 [10]    |
  0.026 [35]    |
  0.029 [7]     |

Latency distribution:
  10% in 0.0001 secs
  25% in 0.0002 secs
  50% in 0.0003 secs
  75% in 0.0006 secs
  90% in 0.0008 secs
  95% in 0.0010 secs
  99% in 0.0029 secs

Details (average, fastest, slowest):
  DNS+dialup:   0.0000 secs, 0.0000 secs, 0.0285 secs
  DNS-lookup:   0.0000 secs, 0.0000 secs, 0.0000 secs
  req write:    0.0000 secs, 0.0000 secs, 0.0229 secs
  resp wait:    0.0006 secs, 0.0000 secs, 0.0228 secs
  resp read:    0.0000 secs, 0.0000 secs, 0.0220 secs

Status code distribution:
  [200] 1000000 responses

Based on the QPS * duration, I would expect 1396881 200s, instead I get a fixed 1000000