Tornado 异步数据库请求性能测试

异步sql查询的测试数据

Server Software:        TornadoServer/5.0.2
Server Hostname:        127.0.0.1
Server Port:            8001

Document Path:          /api/test/
Document Length:        13 bytes

Concurrency Level:      2
Time taken for tests:   0.084 seconds
Complete requests:      20
Failed requests:        0
Total transferred:      5080 bytes
HTML transferred:       260 bytes
Requests per second:    236.91 [#/sec] (mean)
Time per request:       8.442 [ms] (mean)
Time per request:       4.221 [ms] (mean, across all concurrent requests)
Transfer rate:          58.77 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     4    7   2.8      7      16
Waiting:        4    7   2.7      6      16
Total:          4    8   2.7      7      17

单链接数据库同步测试

Server Software:        TornadoServer/5.0.2
Server Hostname:        127.0.0.1
Server Port:            8001

Document Path:          /api/test/
Document Length:        13 bytes

Concurrency Level:      2
Time taken for tests:   0.089 seconds
Complete requests:      20
Failed requests:        0
Total transferred:      5080 bytes
HTML transferred:       260 bytes
Requests per second:    224.70 [#/sec] (mean)
Time per request:       8.901 [ms] (mean)
Time per request:       4.450 [ms] (mean, across all concurrent requests)
Transfer rate:          55.74 [Kbytes/sec] received



Server Software:        TornadoServer/5.0.2
Server Hostname:        127.0.0.1
Server Port:            8001

Document Path:          /api/test/
Document Length:        13 bytes

Concurrency Level:      2
Time taken for tests:   0.058 seconds
Complete requests:      20
Failed requests:        0
Total transferred:      5080 bytes
HTML transferred:       260 bytes
Requests per second:    346.59 [#/sec] (mean)
Time per request:       5.771 [ms] (mean)
Time per request:       2.885 [ms] (mean, across all concurrent requests)
Transfer rate:          85.97 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       1
Processing:     2    5   3.6      4      16
Waiting:        2    5   3.5      4      16
Total:          2    6   3.7      4      16

对比还是很明显的

Time per request:       2.885 [ms] (mean, across all concurrent requests)

你可能感兴趣的:(Tornado 异步数据库请求性能测试)