按照grinder文档的方法调用shareContextBetweenRuns,但实际并未reuse连接

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

按照grinder文档的方法调用shareContextBetweenRuns,但实际并未reuse连接

taohuang
This post was updated on .
http://grinder.sourceforge.net/g3/ssl-support.html


from net.grinder.script.Grinder import grinder

grinder.SSLControl.shareContextBetweenRuns = 1
grinder.SSLControl.setShareContextBetweenRuns(True)

control = HTTPPluginControl.getConnectionDefaults()
request1 = HTTPRequest()

每次请求耗时和单次请求一样,仍然是200~300ms,调用函数后并未reuse ssl connect
这个接口是nginx服务收到请求直接返回的,未做处理,jmeter下重用连接平均响应时间在10ms