调整client中并发池的大小为-t的1.5倍, 优化性能

This commit is contained in:
M09Ic committed 2023-01-05 14:58:14 +08:00
1 parent 94afc01033
commit 3292c2cc86
1 file changed
+1 -1
+1 -1
View File
@@ -26,7 +26,7 @@ func NewClient(thread int, timeout int, clientType int) *Client {
Renegotiation: tls.RenegotiateOnceAsClient,
InsecureSkipVerify: true,
},
MaxConnsPerHost: thread * 2,
MaxConnsPerHost: thread * 3 / 2,
MaxIdleConnDuration: time.Duration(timeout) * time.Second,
MaxConnWaitTimeout: time.Duration(timeout) * time.Second,
ReadTimeout: time.Duration(timeout) * time.Second,