Skip to content

Commit d2f53d7

Browse files
craig[bot]alyshanjahani-crl
andcommitted
Merge #147498
147498: ui: Change the description message for slow executions r=alyshanjahani-crl a=alyshanjahani-crl Previously the wording caused confusion as sometimes executions are marked as slow even though they finish before the latency threshold. Fixes: #140097 Release note (ui change): Change the wording for the slow execution insight Co-authored-by: Alyshan Jahani <[email protected]>
2 parents ebfee3d + a3957e4 commit d2f53d7

File tree

1 file changed

+6
-11
lines changed
  • pkg/ui/workspaces/cluster-ui/src/insights

1 file changed

+6
-11
lines changed

pkg/ui/workspaces/cluster-ui/src/insights/types.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,11 @@ export const highContentionInsight = (
174174
};
175175
};
176176

177-
export const slowExecutionInsight = (
178-
execType: InsightExecEnum,
179-
latencyThreshold?: number,
180-
): Insight => {
181-
let threshold = latencyThreshold + "ms";
182-
if (!latencyThreshold) {
183-
threshold =
184-
"the value of the 'sql.insights.latency_threshold' cluster setting";
185-
}
186-
const description = `This ${execType} took longer than ${threshold} to execute.`;
177+
export const slowExecutionInsight = (execType: InsightExecEnum): Insight => {
178+
const description =
179+
`An execution of this ${execType} was marked as slow. Slow executions ` +
180+
`are determined by the 'sql.insights.latency_threshold' and 'sql.insights.anomaly_detection.threshold' ` +
181+
`cluster settings.`;
187182
return {
188183
name: InsightNameEnum.SLOW_EXECUTION,
189184
label: InsightEnumToLabel.get(InsightNameEnum.SLOW_EXECUTION),
@@ -279,7 +274,7 @@ export const getInsightFromCause = (
279274
case InsightNameEnum.HIGH_RETRY_COUNT:
280275
return highRetryCountInsight(execOption);
281276
default:
282-
return slowExecutionInsight(execOption, latencyThreshold);
277+
return slowExecutionInsight(execOption);
283278
}
284279
};
285280

0 commit comments

Comments
 (0)