Skip to content

Commit 48a72eb

Browse files
reset op start time
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
1 parent 50b95e1 commit 48a72eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

go/vt/topo/stats_conn.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func (st *StatsConn) ListDir(ctx context.Context, dirPath string, full bool) ([]
7575
}
7676
defer st.readSem.Release(1)
7777
topoStatsConnReadWaitTimings.Record(statsKey, startTime)
78+
startTime = time.Now() // reset
7879
defer topoStatsConnTimings.Record(statsKey, startTime)
7980
res, err := st.conn.ListDir(ctx, dirPath, full)
8081
if err != nil {
@@ -125,6 +126,7 @@ func (st *StatsConn) Get(ctx context.Context, filePath string) ([]byte, Version,
125126
}
126127
defer st.readSem.Release(1)
127128
topoStatsConnReadWaitTimings.Record(statsKey, startTime)
129+
startTime = time.Now() // reset
128130
defer topoStatsConnTimings.Record(statsKey, startTime)
129131
bytes, version, err := st.conn.Get(ctx, filePath)
130132
if err != nil {
@@ -143,6 +145,7 @@ func (st *StatsConn) List(ctx context.Context, filePathPrefix string) ([]KVInfo,
143145
}
144146
defer st.readSem.Release(1)
145147
topoStatsConnReadWaitTimings.Record(statsKey, startTime)
148+
startTime = time.Now() // reset
146149
defer topoStatsConnTimings.Record(statsKey, startTime)
147150
bytes, err := st.conn.List(ctx, filePathPrefix)
148151
if err != nil {

0 commit comments

Comments
 (0)