Skip to content

Commit

Permalink
reset op start time
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed Dec 10, 2024
1 parent 50b95e1 commit 48a72eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/vt/topo/stats_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -143,6 +145,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 {
Expand Down

0 comments on commit 48a72eb

Please sign in to comment.