mirror of https://github.com/tikv/client-go.git
region_request: fix execution details collection when sending request (#1752)
Signed-off-by: tangenta <tangenta@126.com>
This commit is contained in:
parent
b794d68177
commit
469a7adf7a
|
|
@ -173,7 +173,7 @@ func (s *testGCWithTiKVSuite) dropKeyspace(keyspaceMeta *keyspacepb.KeyspaceMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
func genKeyspaceName() string {
|
func genKeyspaceName() string {
|
||||||
return uuid.New().String()
|
return strings.ReplaceAll(uuid.New().String(), "-", "")[:20]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *testGCWithTiKVSuite) prepareClients(storeKeyspaceTypes ...storeKeyspaceType) {
|
func (s *testGCWithTiKVSuite) prepareClients(storeKeyspaceTypes ...storeKeyspaceType) {
|
||||||
|
|
|
||||||
|
|
@ -1131,7 +1131,7 @@ func (s *sendReqState) send() (canceled bool) {
|
||||||
|
|
||||||
var execDetails *util.ExecDetails
|
var execDetails *util.ExecDetails
|
||||||
if stmtExec := ctx.Value(util.ExecDetailsKey); stmtExec != nil {
|
if stmtExec := ctx.Value(util.ExecDetailsKey); stmtExec != nil {
|
||||||
execDetails := stmtExec.(*util.ExecDetails)
|
execDetails = stmtExec.(*util.ExecDetails)
|
||||||
atomic.AddInt64(&execDetails.WaitKVRespDuration, int64(rpcDuration))
|
atomic.AddInt64(&execDetails.WaitKVRespDuration, int64(rpcDuration))
|
||||||
}
|
}
|
||||||
collector := networkCollector{
|
collector := networkCollector{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue