Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yufansong committed Feb 22, 2024
1 parent 67480d7 commit acfe6ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions dashboard/pages/api/metric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion dashboard/pages/fragment_graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
Expand Down

0 comments on commit acfe6ad

Please sign in to comment.