$ ab -n 10000 -c 100 http://127.0.0.1:8000/random
Server Software: gunicorn/19.4.5
Server Hostname: 127.0.0.1
Server Port: 8000
Document Path: /random
Document Length: 12379 bytes
Concurrency Level: 100
Time taken for tests: 17.068 seconds
Complete requests: 10000
Failed requests: 9790 # 大部分请求都失败了?
(Connect: 0, Receive: 0, Length: 9790, Exceptions: 0)
Total transferred: 125432017 bytes
HTML transferred: 123732017 bytes # 从传输的数据量来看好像又没问题,差不多正好是 1 万个请求应该传输的字节数
Requests per second: 585.91 [#/sec] (mean)
Time per request: 170.676 [ms] (mean)
Time per request: 1.707 [ms] (mean, across all concurrent requests)
Transfer rate: 7176.89 [Kbytes/sec] received