Skip to content

Commit bc9f9aa

Browse files
authored
metrics: add p50 pull TTS panel (#8290)
Add a pull-only TTS scalar next to the combined pull/trunk/docs-build panel on the HUD metrics page. Uses the existing WorkflowDuration component, so it respects the time-range and percentile pickers. This issues its own small pull-only query rather than reusing the combined one.
1 parent 1878082 commit bc9f9aa

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

torchci/pages/metrics.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,14 @@ function WorkflowDuration({
391391
percentile,
392392
timeParams,
393393
workflowNames,
394+
badThresholdSec = 60 * 60 * 4,
394395
}: {
395396
percentile: number;
396397
timeParams: { [key: string]: string };
397398
workflowNames: string[];
399+
// TTS above this many seconds renders the value in red. Absolute, so it's
400+
// tuned for p50; higher percentiles will naturally read red.
401+
badThresholdSec?: number;
398402
}) {
399403
let title: string = `p${percentile * 100} ${workflowNames.join(", ")} TTS`;
400404
let queryName: string = "workflow_duration_percentile";
@@ -416,7 +420,7 @@ function WorkflowDuration({
416420
workflowNames: workflowNames,
417421
percentile,
418422
}}
419-
badThreshold={(value) => value > 60 * 60 * 4} // 3 hours
423+
badThreshold={(value) => value > badThresholdSec}
420424
/>
421425
);
422426
}
@@ -843,6 +847,12 @@ export default function Page() {
843847
timeParams={timeParams}
844848
workflowNames={["pull", "trunk", "docs-build"]}
845849
/>
850+
<WorkflowDuration
851+
percentile={ttsPercentile}
852+
timeParams={timeParams}
853+
workflowNames={["pull"]}
854+
badThresholdSec={60 * 60 * 2} // 2 hours
855+
/>
846856
</Stack>
847857
</Grid>
848858

0 commit comments

Comments
 (0)