Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: add latency info to explain plan tab #107719

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ const planDetailsColumnLabels = {
insights: "Insights",
indexes: "Used Indexes",
lastExecTime: "Last Execution Time",
latencyMax: "Max Latency",
latencyMin: "Min Latency",
latencyP50: "P50 Latency",
latencyP90: "P90 Latency",
latencyP99: "P99 Latency",
planGist: "Plan Gist",
vectorized: "Vectorized",
};
Expand Down Expand Up @@ -100,6 +105,71 @@ export const planDetailsTableTitles: PlanDetailsTableTitleType = {
</Tooltip>
);
},
latencyP50: () => {
return (
<Tooltip
style="tableTitle"
placement="bottom"
content={
"The 50th latency percentile for sampled statement executions with this Explain Plan."
}
>
{planDetailsColumnLabels.latencyP50}
</Tooltip>
);
},
latencyP90: () => {
return (
<Tooltip
style="tableTitle"
placement="bottom"
content={
"The 90th latency percentile for sampled statement executions with this Explain Plan."
}
>
{planDetailsColumnLabels.latencyP90}
</Tooltip>
);
},
latencyP99: () => {
return (
<Tooltip
style="tableTitle"
placement="bottom"
content={
"The 99th latency percentile for sampled statement executions with this Explain Plan."
}
>
{planDetailsColumnLabels.latencyP99}
</Tooltip>
);
},
latencyMin: () => {
return (
<Tooltip
style="tableTitle"
placement="bottom"
content={
"The lowest latency value for all statement executions with this Explain Plan."
}
>
{planDetailsColumnLabels.latencyMin}
</Tooltip>
);
},
latencyMax: () => {
return (
<Tooltip
style="tableTitle"
placement="bottom"
content={
"The highest latency value for all statement executions with this Explain Plan."
}
>
{planDetailsColumnLabels.latencyMax}
</Tooltip>
);
},
execCount: () => {
return (
<Tooltip
Expand Down Expand Up @@ -335,6 +405,41 @@ export function makeExplainPlanColumns(
sort: (item: PlanHashStats) =>
RenderCount(item.metadata.full_scan_count, item.metadata.total_count),
},
{
name: "latencyMin",
title: planDetailsTableTitles.latencyMin(),
cell: (item: PlanHashStats) =>
formatNumberForDisplay(item.stats.latency_info.min, duration),
sort: (item: PlanHashStats) => item.stats.latency_info.min,
},
{
name: "latencyMax",
title: planDetailsTableTitles.latencyMax(),
cell: (item: PlanHashStats) =>
formatNumberForDisplay(item.stats.latency_info.max, duration),
sort: (item: PlanHashStats) => item.stats.latency_info.max,
},
{
name: "latencyP50",
title: planDetailsTableTitles.latencyP50(),
cell: (item: PlanHashStats) =>
formatNumberForDisplay(item.stats.latency_info.p50, duration),
sort: (item: PlanHashStats) => item.stats.latency_info.p50,
},
{
name: "latencyP90",
title: planDetailsTableTitles.latencyP90(),
cell: (item: PlanHashStats) =>
formatNumberForDisplay(item.stats.latency_info.p90, duration),
sort: (item: PlanHashStats) => item.stats.latency_info.p90,
},
{
name: "latencyP99",
title: planDetailsTableTitles.latencyP99(),
cell: (item: PlanHashStats) =>
formatNumberForDisplay(item.stats.latency_info.p99, duration),
sort: (item: PlanHashStats) => item.stats.latency_info.p99,
},
{
name: "distSQL",
title: planDetailsTableTitles.distSQL(),
Expand Down