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

This commit is contained in:
M09Ic 2023-01-05 15:01:08 +08:00
parent 679b0a129d
commit da714a1fcc

View File

@ -50,7 +50,7 @@ func NewClient(thread int, timeout int, clientType int) *Client {
Renegotiation: tls.RenegotiateOnceAsClient,
InsecureSkipVerify: true,
},
MaxConnsPerHost: thread,
MaxConnsPerHost: thread * 3 / 2,
IdleConnTimeout: time.Duration(timeout) * time.Second,
},
Timeout: time.Second * time.Duration(timeout),