Concurrency Level: 200 Time taken for tests: 57.398 seconds Complete requests: 7000 Failed requests: 6555 (Connect: 0, Receive: 0, Length: 6555, Exceptions: Write errors: 0 Total transferred: 2355482 bytes HTML transferred: 1046482 bytes Requests per second: 121.95 [#/sec] (mean) // 每秒只能处理121次请求 Time per request: 1639.951 [ms] (mean) Time per request: 8.200 [ms] (mean, across all c Transfer rate: 40.08 [Kbytes/sec] received
这是打开APC,PDO不持续连接数据库的时候:
Concurrency Level: 200 Time taken for tests: 33.709 seconds Complete requests: 7000 Failed requests: 3652 (Connect: 0, Receive: 0, Length: 3652, Exceptions: 0) Write errors: 0 Total transferred: 2354512 bytes HTML transferred: 1045512 bytes Requests per second: 207.66 [#/sec] (mean) // 稍微高一点 Time per request: 963.112 [ms] (mean) Time per request: 4.816 [ms] (mean, across all concurrent requests) Transfer rate: 68.21 [Kbytes/sec] received
这是打开APC+PDO设定持续连接的时候:
Concurrency Level: 200 Time taken for tests: 24.229 seconds Complete requests: 7000 Failed requests: 4994 (Connect: 0, Receive: 0, Length: 4994, Exceptions: 0) Write errors: 0 Total transferred: 2362188 bytes HTML transferred: 1053188 bytes Requests per second: 288.91 [#/sec] (mean) // 稍微稍微比之前的高一点,但是持续连接用不好会有灾难性事件的 Time per request: 692.268 [ms] (mean) Time per request: 3.461 [ms] (mean, across all concurrent requests) Transfer rate: 95.21 [Kbytes/sec] received