From 08f4b69d3dd17a6e419aeada64fb23a1ba29c682 Mon Sep 17 00:00:00 2001 From: HunDunDM Date: Fri, 16 Sep 2022 15:28:53 +0800 Subject: [PATCH] fix metrics Signed-off-by: HunDunDM --- server/cluster/coordinator.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/cluster/coordinator.go b/server/cluster/coordinator.go index 1b1e44fcbc2..0968b752cd5 100644 --- a/server/cluster/coordinator.go +++ b/server/cluster/coordinator.go @@ -612,9 +612,12 @@ func collectPendingInfluence(stores []*core.StoreInfo) { storeID := s.GetID() storeLabel := strconv.FormatUint(storeID, 10) if infl := pendings[storeID]; infl != nil { - hotSpotStatusGauge.WithLabelValues(storeAddress, storeLabel, "pending_influence_byte_rate").Set(infl.Loads[statistics.ByteDim]) - hotSpotStatusGauge.WithLabelValues(storeAddress, storeLabel, "pending_influence_key_rate").Set(infl.Loads[statistics.KeyDim]) - hotSpotStatusGauge.WithLabelValues(storeAddress, storeLabel, "pending_influence_query_rate").Set(infl.Loads[statistics.QueryDim]) + hotSpotStatusGauge.WithLabelValues(storeAddress, storeLabel, "read_pending_influence_byte_rate").Set(infl.Loads[statistics.RegionReadBytes]) + hotSpotStatusGauge.WithLabelValues(storeAddress, storeLabel, "read_pending_influence_key_rate").Set(infl.Loads[statistics.RegionReadKeys]) + hotSpotStatusGauge.WithLabelValues(storeAddress, storeLabel, "read_pending_influence_query_rate").Set(infl.Loads[statistics.RegionReadQueryNum]) + hotSpotStatusGauge.WithLabelValues(storeAddress, storeLabel, "write_pending_influence_byte_rate").Set(infl.Loads[statistics.RegionWriteBytes]) + hotSpotStatusGauge.WithLabelValues(storeAddress, storeLabel, "write_pending_influence_key_rate").Set(infl.Loads[statistics.RegionWriteKeys]) + hotSpotStatusGauge.WithLabelValues(storeAddress, storeLabel, "write_pending_influence_query_rate").Set(infl.Loads[statistics.RegionWriteQueryNum]) hotSpotStatusGauge.WithLabelValues(storeAddress, storeLabel, "pending_influence_count").Set(infl.Count) } }