use cache reduce malloc

This commit is contained in:
hebo
2019-09-09 21:36:18 +08:00
parent 3294a0fc5f
commit 4086028217
12 changed files with 280 additions and 169 deletions

View File

@@ -82,6 +82,10 @@ func outletSetConfig(resp http.ResponseWriter, req *http.Request) {
mp.Err = SetConfig(ep.ConfigName, ep.Value)
}
func GetThrowPacketRate() float64 {
return throwPacketRate.value
func GetTCPThrowPacketRate() float64 {
return throwPacketRate.tcpTPR
}
func GetMysqlThrowPacketRate() float64 {
return throwPacketRate.mysqlTPR
}