From 7ae2b141d3633e8e4a04474eb723f51b0c633b81 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Wed, 11 Dec 2024 00:15:49 +0100 Subject: [PATCH] reset op start time Signed-off-by: Tim Vaillancourt --- go/vt/topo/stats_conn.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/go/vt/topo/stats_conn.go b/go/vt/topo/stats_conn.go index ce63f56b59e..ded362b9139 100644 --- a/go/vt/topo/stats_conn.go +++ b/go/vt/topo/stats_conn.go @@ -75,6 +75,7 @@ func (st *StatsConn) ListDir(ctx context.Context, dirPath string, full bool) ([] } defer st.readSem.Release(1) topoStatsConnReadWaitTimings.Record(statsKey, startTime) + startTime = time.Now() // reset defer topoStatsConnTimings.Record(statsKey, startTime) res, err := st.conn.ListDir(ctx, dirPath, full) if err != nil { @@ -125,6 +126,7 @@ func (st *StatsConn) Get(ctx context.Context, filePath string) ([]byte, Version, } defer st.readSem.Release(1) topoStatsConnReadWaitTimings.Record(statsKey, startTime) + startTime = time.Now() // reset defer topoStatsConnTimings.Record(statsKey, startTime) bytes, version, err := st.conn.Get(ctx, filePath) if err != nil { @@ -143,6 +145,7 @@ func (st *StatsConn) GetVersion(ctx context.Context, filePath string, version in } defer st.readSem.Release(1) topoStatsConnReadWaitTimings.Record(statsKey, startTime) + startTime = time.Now() // reset defer topoStatsConnTimings.Record(statsKey, startTime) bytes, err := st.conn.GetVersion(ctx, filePath, version) if err != nil { @@ -161,6 +164,7 @@ func (st *StatsConn) List(ctx context.Context, filePathPrefix string) ([]KVInfo, } defer st.readSem.Release(1) topoStatsConnReadWaitTimings.Record(statsKey, startTime) + startTime = time.Now() // reset defer topoStatsConnTimings.Record(statsKey, startTime) bytes, err := st.conn.List(ctx, filePathPrefix) if err != nil {