File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 66 SparkStagesStore ,
77 SQLNodeStageData ,
88} from "../interfaces/AppStore" ;
9+ import { calculatePercentage } from "../utils/FormatUtils" ;
910import { generateGraph } from "./PlanGraphUtils" ;
1011import { calculateNodeToStorageInfo } from "./SqlReducer" ;
1112
@@ -320,14 +321,7 @@ export function calculateSqlStage(
320321 : undefined ) ;
321322 const durationPercentage =
322323 duration !== undefined && sql . stageMetrics !== undefined
323- ? sql . stageMetrics ?. executorRunTime === 0
324- ? 0
325- : Math . max (
326- 0 ,
327- Math . min ( 100 , duration / sql . stageMetrics ?. executorRunTime ) *
328- 100 ,
329- )
330- : undefined ;
324+ ? calculatePercentage ( duration , sql . stageMetrics ?. executorRunTime ) : undefined
331325 return {
332326 ...node ,
333327 duration : duration ,
You can’t perform that action at this time.
0 commit comments