From eb4a62432faa8f966551422e76daab627bd8a62c Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Tue, 10 Dec 2024 01:34:56 +0100 Subject: [PATCH] better stat name Signed-off-by: Tim Vaillancourt --- go/vt/topo/stats_conn.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/go/vt/topo/stats_conn.go b/go/vt/topo/stats_conn.go index 25a54fdfa18..9229c2681e3 100644 --- a/go/vt/topo/stats_conn.go +++ b/go/vt/topo/stats_conn.go @@ -35,15 +35,15 @@ var ( "TopologyConnOperations timings", []string{"Operation", "Cell"}) - topoStatsConnWaitTimings = stats.NewMultiTimings( - "TopologyConnWaits", - "TopologyConnWait timings", - []string{"Operation", "Cell"}) - topoStatsConnErrors = stats.NewCountersWithMultiLabels( "TopologyConnErrors", "TopologyConnErrors errors per operation", []string{"Operation", "Cell"}) + + topoStatsReadWaitTimings = stats.NewMultiTimings( + "TopologyReadWaits", + "TopologyReadWait timings", + []string{"Operation", "Cell"}) ) const readOnlyErrorStrFormat = "cannot perform %s on %s as the topology server connection is read-only" @@ -74,7 +74,7 @@ func (st *StatsConn) ListDir(ctx context.Context, dirPath string, full bool) ([] return nil, err } defer st.readSem.Release(1) - topoStatsConnWaitTimings.Record(statsKey, startTime) + topoStatsReadWaitTimings.Record(statsKey, startTime) defer topoStatsConnTimings.Record(statsKey, startTime) res, err := st.conn.ListDir(ctx, dirPath, full) if err != nil { @@ -124,7 +124,7 @@ func (st *StatsConn) Get(ctx context.Context, filePath string) ([]byte, Version, return nil, nil, err } defer st.readSem.Release(1) - topoStatsConnWaitTimings.Record(statsKey, startTime) + topoStatsReadWaitTimings.Record(statsKey, startTime) defer topoStatsConnTimings.Record(statsKey, startTime) bytes, version, err := st.conn.Get(ctx, filePath) if err != nil { @@ -142,7 +142,7 @@ func (st *StatsConn) List(ctx context.Context, filePathPrefix string) ([]KVInfo, return nil, err } defer st.readSem.Release(1) - topoStatsConnWaitTimings.Record(statsKey, startTime) + topoStatsReadWaitTimings.Record(statsKey, startTime) defer topoStatsConnTimings.Record(statsKey, startTime) bytes, err := st.conn.List(ctx, filePathPrefix) if err != nil {