架构师系列之 8:python 网站压测工具
使用 request 后的 response 中时间来计算平均相应时间, 95%响应时间:
关于 elapsed 中的时间差解释:https://www.cnblogs.com/landhu/p/5442069.html
Send request in batch: 0
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]
Send request in batch: 1
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]
Send request in batch: 2
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]
Send request in batch: 3
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]
Send request in batch: 4
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]
Send request in batch: 5
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]
Send request in batch: 6
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]
Send request in batch: 7
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]
Send request in batch: 8
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]
Send request in batch: 9
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]
[17445, 18356, 18615, 18803, 19253, 19296, 19675, 19725, 19932, 19934, 20026, 20185, 20199, 20213, 20268, 20270, 20585, 20595, 20608, 20762, 21015, 21078, 21177, 21217, 21234, 21256, 21259, 21320, 21354, 21383, 21530, 21563, 21635, 21657, 21676, 21724, 21728, 21735, 21755, 21840, 21916, 22060, 22087, 22115, 22218, 22250, 22277, 22380, 22396, 22431, 22465, 22531, 22534, 22661, 22666, 22840, 22873, 22907, 23070, 23105, 23147, 23208, 23240, 23274, 23279, 23332, 23373, 23438, 23634, 23739, 23868, 23979, 24001, 24055, 24129, 24217, 24344, 24364, 24629, 24642, 24686, 24817, 25180, 25306, 25590, 25722, 25774, 25830, 26384, 26487, 26492, 26724, 26767, 26938, 27036, 27431, 27959, 28335, 30206, 31448]
100
95% 响应时间:27.036 ms
平均响应时间:22.84667 ms
版权声明: 本文为 InfoQ 作者【桃花原记】的原创文章。
原文链接:【http://xie.infoq.cn/article/caefda956f87e04681afb5c0d】。文章转载请联系作者。
评论