Skip to content

Commit

Permalink
ui: update label "CPU" to "SQL CPU"
Browse files Browse the repository at this point in the history
Previosuly, we were using the label "CPU Time" in the
Console, which could be confusing since it was only SQL CPU Time.

This commit updates the title and tooltips to clarify that.

Fixes #116409

Release note (ui change): Update "CPU Time" label to "SQL CPU Time" on the
Console and add clarification to its tooltip.
  • Loading branch information
maryliag committed Dec 14, 2023
1 parent 1d4fc67 commit 7f7eda7
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const StatementInsightDetailsOverviewTab: React.FC<
value={Duration(insightDetails?.elapsedTimeMillis * 1e6)}
/>
<SummaryCardItem
label={"CPU Time"}
label={"SQL CPU Time"}
value={Duration(insightDetails?.cpuSQLNanos)}
/>
<SummaryCardItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ the maximum number of statements was reached in the console.`;
value={Duration(txnDetails.elapsedTimeMillis * 1e6)}
/>
<SummaryCardItem
label="CPU Time"
label="SQL CPU Time"
value={Duration(txnDetails.cpuSQLNanos)}
/>
<SummaryCardItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const insightsColumnLabels = {
databaseName: "Database Name",
tableName: "Table Name",
indexName: "Index Name",
cpu: "CPU Time",
cpu: "SQL CPU Time",
};

export type InsightsTableColumnKeys = keyof typeof insightsColumnLabels;
Expand Down Expand Up @@ -238,7 +238,8 @@ export const insightsTableTitles: InsightsTableTitleType = {
},
cpu: (_: InsightExecEnum) => {
return makeToolTip(
<p>{`CPU Time spent executing within the specified time interval.`}</p>,
<p>{`SQL CPU Time spent executing within the specified time interval. It
does not include SQL planning time nor KV execution time.`}</p>,
"cpu",
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,8 @@ export class StatementDetails extends React.Component<
const cpuTimeseries: AlignedData =
generateCPUTimeseries(statsPerAggregatedTs);
const cpuOps: Partial<Options> = {
axes: [{}, { label: "CPU Time" }],
series: [{}, { label: "CPU Time" }],
axes: [{}, { label: "SQL CPU Time" }],
series: [{}, { label: "SQL CPU Time" }],
legend: { show: false },
width: cardWidth,
};
Expand Down Expand Up @@ -831,7 +831,7 @@ export class StatementDetails extends React.Component<
)}
/>
<SummaryCardItem
label="CPU Time"
label="SQL CPU Time"
value={formatNumberForDisplay(
stats?.exec_stats?.cpu_sql_nanos.mean,
Duration,
Expand Down Expand Up @@ -909,7 +909,7 @@ export class StatementDetails extends React.Component<
</Col>
<Col className="gutter-row" span={12}>
<BarGraphTimeSeries
title={`CPU Time${noSamples}`}
title={`SQL CPU Time${noSamples}`}
alignedData={cpuTimeseries}
uPlotOptions={cpuOps}
tooltip={unavailableTooltip}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const statisticsColumnLabels = {
bytesRead: "Bytes Read",
clientAddress: "Client IP Address",
contention: "Contention Time",
cpu: "CPU Time",
cpu: "SQL CPU Time",
database: "Database",
diagnostics: "Diagnostics",
executionCount: "Execution Count",
Expand Down Expand Up @@ -650,8 +650,9 @@ export const statisticsTableTitles: StatisticTableTitleType = {
content={
<>
<p>
Average CPU time spent executing within the specified time
interval. The gray bar indicates mean CPU time. The blue bar
Average SQL CPU time spent executing within the specified time
interval. It does not include SQL planning time nor KV execution
time. The gray bar indicates mean SQL CPU time. The blue bar
indicates one standard deviation from the mean.
</p>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function getSortLabel(
case SqlStatsSortOptions.EXECUTION_COUNT:
return "Execution Count";
case SqlStatsSortOptions.CPU_TIME:
return "CPU Time";
return "SQL CPU Time";
case SqlStatsSortOptions.P99_STMTS_ONLY:
return "P99 Latency";
case SqlStatsSortOptions.CONTENTION_TIME:
Expand Down

0 comments on commit 7f7eda7

Please sign in to comment.