mirror of https://github.com/tikv/client-go.git
Fix that histogram is not inserted into rpcNetLatencyHistCache (#563)
* Fix that histogram is not inserted into rpcNetLatencyHistCache Signed-off-by: Yilin Chen <sticnarf@gmail.com> * downgrade golangci-lint to avoid gofmt complaints temporarily Signed-off-by: Yilin Chen <sticnarf@gmail.com>
This commit is contained in:
parent
e10841f2d1
commit
2ed2113d10
|
|
@ -46,4 +46,6 @@ jobs:
|
|||
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v2.5.2
|
||||
with:
|
||||
version: v1.47.3
|
||||
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ func (c *RPCClient) updateTiKVSendReqHistogram(req *tikvrpc.Request, resp *tikvr
|
|||
storeIDStr = strconv.FormatUint(storeID, 10)
|
||||
}
|
||||
latHist = metrics.TiKVRPCNetLatencyHistogram.WithLabelValues(storeIDStr)
|
||||
sendReqHistCache.Store(storeID, latHist)
|
||||
rpcNetLatencyHistCache.Store(storeID, latHist)
|
||||
}
|
||||
latency := elapsed - time.Duration(execDetail.TimeDetail.TotalRpcWallTimeNs)*time.Nanosecond
|
||||
latHist.(prometheus.Observer).Observe(latency.Seconds())
|
||||
|
|
|
|||
Loading…
Reference in New Issue