From acfe6ad53ffa9bc6ae5775ec9cf66945551a2dcd Mon Sep 17 00:00:00 2001 From: yufansong Date: Thu, 22 Feb 2024 12:18:02 -0800 Subject: [PATCH] fix bug --- dashboard/pages/api/metric.ts | 3 +-- dashboard/pages/fragment_graph.tsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dashboard/pages/api/metric.ts b/dashboard/pages/api/metric.ts index acb4e14ee6103..43a483181a74c 100644 --- a/dashboard/pages/api/metric.ts +++ b/dashboard/pages/api/metric.ts @@ -24,7 +24,6 @@ export interface BackPressuresMetrics { // Get back pressure from meta node -> prometheus export async function getActorBackPressures() { - console.log("send api") const res: BackPressuresMetrics = await api.get( "/metrics/actor/back_pressures" ) @@ -68,7 +67,7 @@ function convertToMapAndAgg( for (const [key, value] of mapValue) { // add || 1 to avoid NaN and pass check - map.set(key, value / mapNumber.get(key)) + map.set(key, value / (mapNumber.get(key) || 1)) } return map } diff --git a/dashboard/pages/fragment_graph.tsx b/dashboard/pages/fragment_graph.tsx index e9b5866b8a2da..f7b3764a6bf4a 100644 --- a/dashboard/pages/fragment_graph.tsx +++ b/dashboard/pages/fragment_graph.tsx @@ -382,7 +382,7 @@ export default function Streaming() { const value = algoFunc(m.sample) * 100 map.set( - `${m.metric.fragmentId}_${m.metric.downstreamFragmentId}`, + `${m.metric.fragment_id}_${m.metric.downstream_fragment_id}`, value ) }