From 527baeb2ae6c615a79a4baa5a36dd4c30fe93c9c Mon Sep 17 00:00:00 2001 From: yufansong Date: Mon, 29 Jan 2024 22:35:17 -0800 Subject: [PATCH] fix nits --- dashboard/pages/api/metric.ts | 7 ++----- dashboard/pages/back_pressure_rates.tsx | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/dashboard/pages/api/metric.ts b/dashboard/pages/api/metric.ts index d4953f60a1dda..fc6c0b022ccb2 100644 --- a/dashboard/pages/api/metric.ts +++ b/dashboard/pages/api/metric.ts @@ -15,7 +15,6 @@ * */ import { Metrics, MetricsSample } from "../../components/metrics" -import { Field } from "../../proto/gen/plan_common" import api from "./api" export interface BackPressuresMetrics { @@ -43,7 +42,7 @@ export const BackPressureInfo = { actorId: isSet(object.actorId) ? Number(object.actorId) : 0, fragmentId: isSet(object.fragmentId) ? Number(object.fragmentId) : 0, downstreamFragmentId: isSet(object.downstreamFragmentId) ? Number(object.downstreamFragmentId) : 0, - value: isSet(object.value) ? Number(object.value) : "0", + value: isSet(object.value) ? Number(object.value) : 0, } }, } @@ -51,9 +50,7 @@ export const BackPressureInfo = { // Get back pressure from meta node -> compute node export async function getComputeBackPressures() { const response = await api.get("/metrics/back_pressures"); - let back_pressure_infos: BackPressureInfo[] = response.backPressureInfos.map(BackPressureInfo.fromJSON) - back_pressure_infos = back_pressure_infos.sort((a, b) => a.actorId - b.actorId) return back_pressure_infos } @@ -82,4 +79,4 @@ export function p99(samples: MetricsSample[]) { function isSet(value: any): boolean { return value !== null && value !== undefined; -} \ No newline at end of file +} diff --git a/dashboard/pages/back_pressure_rates.tsx b/dashboard/pages/back_pressure_rates.tsx index 1871d99017234..f0c79539a63c0 100644 --- a/dashboard/pages/back_pressure_rates.tsx +++ b/dashboard/pages/back_pressure_rates.tsx @@ -144,4 +144,4 @@ export default function back_pressure() { {table} ) -} \ No newline at end of file +}