diff --git a/pkg/ui/workspaces/cluster-ui/src/barCharts/barCharts.stories.tsx b/pkg/ui/workspaces/cluster-ui/src/barCharts/barCharts.stories.tsx index addc66c15ca2..bd91b7b1ed51 100644 --- a/pkg/ui/workspaces/cluster-ui/src/barCharts/barCharts.stories.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/barCharts/barCharts.stories.tsx @@ -13,7 +13,6 @@ import { storiesOf, DecoratorFn } from "@storybook/react"; import { countBarChart, - rowsReadBarChart, bytesReadBarChart, latencyBarChart, maxMemUsageBarChart, @@ -56,10 +55,6 @@ storiesOf("BarCharts", module) const chartFactory = countBarChart(statements); return chartFactory(statements[0]); }) - .add("rowsReadBarChart", () => { - const chartFactory = rowsReadBarChart(statements); - return chartFactory(statements[0]); - }) .add("bytesReadBarChart", () => { const chartFactory = bytesReadBarChart(statements); return chartFactory(statements[0]); @@ -87,10 +82,6 @@ storiesOf("BarCharts/within column (150px)", module) const chartFactory = countBarChart(statements); return chartFactory(statements[0]); }) - .add("rowsReadBarChart", () => { - const chartFactory = rowsReadBarChart(statements); - return chartFactory(statements[0]); - }) .add("bytesReadBarChart", () => { const chartFactory = bytesReadBarChart(statements); return chartFactory(statements[0]); diff --git a/pkg/ui/workspaces/cluster-ui/src/barCharts/barCharts.tsx b/pkg/ui/workspaces/cluster-ui/src/barCharts/barCharts.tsx index 1fd544e1b2d0..4d73cdac519e 100644 --- a/pkg/ui/workspaces/cluster-ui/src/barCharts/barCharts.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/barCharts/barCharts.tsx @@ -13,7 +13,7 @@ import { stdDevLong, longToInt } from "src/util"; import { Duration, Bytes, Percentage } from "src/util/format"; import classNames from "classnames/bind"; import styles from "./barCharts.module.scss"; -import { bar, formatTwoPlaces, approximify } from "./utils"; +import { bar, approximify } from "./utils"; import { barChartFactory, BarChartOptions } from "./barChartFactory"; import { AggregateStatistics } from "src/statementsTable/statementsTable"; @@ -27,18 +27,10 @@ const countBars = [ ), ]; -const rowsReadBars = [ - bar("rows-read", (d: StatementStatistics) => d.stats.rows_read.mean), -]; - const bytesReadBars = [ bar("bytes-read", (d: StatementStatistics) => d.stats.bytes_read.mean), ]; -const rowsWrittenBars = [ - bar("rows-written", (d: StatementStatistics) => d.stats.rows_written?.mean), -]; - const latencyBars = [ bar("bar-chart__parse", (d: StatementStatistics) => d.stats.parse_lat.mean), bar("bar-chart__plan", (d: StatementStatistics) => d.stats.plan_lat.mean), @@ -78,16 +70,9 @@ const retryBars = [ ), ]; -const rowsReadStdDev = bar(cx("rows-read-dev"), (d: StatementStatistics) => - stdDevLong(d.stats.rows_read, d.stats.count), -); const bytesReadStdDev = bar(cx("bytes-read-dev"), (d: StatementStatistics) => stdDevLong(d.stats.bytes_read, d.stats.count), ); -const rowsWrittenStdDev = bar( - cx("rows-written-dev"), - (d: StatementStatistics) => stdDevLong(d.stats.rows_written, d.stats.count), -); const latencyStdDev = bar( cx("bar-chart__overall-dev"), (d: StatementStatistics) => stdDevLong(d.stats.service_lat, d.stats.count), @@ -107,26 +92,12 @@ const networkBytesStdDev = bar( ); export const countBarChart = barChartFactory("grey", countBars, approximify); -export const rowsReadBarChart = barChartFactory( - "grey", - rowsReadBars, - approximify, - rowsReadStdDev, - formatTwoPlaces, -); export const bytesReadBarChart = barChartFactory( "grey", bytesReadBars, Bytes, bytesReadStdDev, ); -export const rowsWrittenBarChart = barChartFactory( - "grey", - rowsWrittenBars, - approximify, - rowsWrittenStdDev, - formatTwoPlaces, -); export const latencyBarChart = barChartFactory( "grey", latencyBars, diff --git a/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTable.tsx b/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTable.tsx index cd5171f072ad..90ccb3f23b95 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTable.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTable.tsx @@ -19,9 +19,7 @@ import { } from "src/util"; import { countBarChart, - rowsReadBarChart, bytesReadBarChart, - rowsWrittenBarChart, latencyBarChart, contentionBarChart, maxMemUsageBarChart, @@ -71,12 +69,7 @@ function makeCommonColumns( }; const countBar = countBarChart(statements, defaultBarChartOptions); - const rowsReadBar = rowsReadBarChart(statements, defaultBarChartOptions); const bytesReadBar = bytesReadBarChart(statements, defaultBarChartOptions); - const rowsWrittenBar = rowsWrittenBarChart( - statements, - defaultBarChartOptions, - ); const latencyBar = latencyBarChart(statements, defaultBarChartOptions); const contentionBar = contentionBarChart( statements, @@ -109,12 +102,18 @@ function makeCommonColumns( showByDefault: false, }, { - name: "rowsRead", - title: statisticsTableTitles.rowsRead(statType), + name: "rowsProcessed", + title: statisticsTableTitles.rowsProcessed(statType), className: cx("statements-table__col-rows-read"), - cell: rowsReadBar, + cell: (stmt: AggregateStatistics) => + `${FixLong(Number(stmt.stats.rows_read.mean))} Reads / ${FixLong( + Number(stmt.stats.rows_written?.mean), + )} Writes`, sort: (stmt: AggregateStatistics) => - FixLong(Number(stmt.stats.rows_read.mean)), + FixLong( + Number(stmt.stats.rows_read.mean) + + Number(stmt.stats.rows_written?.mean), + ), }, { name: "bytesRead", @@ -123,14 +122,6 @@ function makeCommonColumns( sort: (stmt: AggregateStatistics) => FixLong(Number(stmt.stats.bytes_read.mean)), }, - { - name: "rowsWritten", - title: statisticsTableTitles.rowsWritten(statType), - cell: rowsWrittenBar, - sort: (stmt: AggregateStatistics) => - FixLong(Number(stmt.stats.rows_written?.mean)), - showByDefault: false, - }, { name: "time", title: statisticsTableTitles.time(statType), diff --git a/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx b/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx index 192d700c541e..a756925756c7 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx @@ -52,8 +52,7 @@ export const statisticsColumnLabels = { networkBytes: "Network", regionNodes: "Regions/Nodes", retries: "Retries", - rowsRead: "Rows Read", - rowsWritten: "Rows Written", + rowsProcessed: "Rows Processed", statements: "Statements", statementsCount: "Statements", time: "Time", @@ -385,7 +384,7 @@ export const statisticsTableTitles: StatisticTableTitleType = { ); }, - rowsRead: (statType: StatisticType) => { + rowsProcessed: (statType: StatisticType) => { let contentModifier = ""; let fingerprintModifier = ""; switch (statType) { @@ -409,24 +408,20 @@ export const statisticsTableTitles: StatisticTableTitleType = { content={ <>
- {"Aggregation of all rows "}
+ {"Average (mean) number of rows "}
- The gray bar indicates the mean number of rows read from disk. The - blue bar indicates one standard deviation from the mean. + {` to disk across all operators for ${contentModifier} with this fingerprint${fingerprintModifier} within the specified time interval.`}
> } > - {getLabel("rowsRead")} + {getLabel("rowsProcessed")} ); }, @@ -475,51 +470,6 @@ export const statisticsTableTitles: StatisticTableTitleType = { ); }, - rowsWritten: (statType: StatisticType) => { - let contentModifier = ""; - let fingerprintModifier = ""; - switch (statType) { - case "transaction": - contentModifier = contentModifiers.transaction; - break; - case "statement": - contentModifier = contentModifiers.statements; - break; - case "transactionDetails": - contentModifier = contentModifiers.statements; - fingerprintModifier = - " for this " + contentModifiers.transactionFingerprint; - break; - } - - return ( -
- {"Aggregation of all rows "}
-
- The gray bar indicates the mean number of rows written to disk. - The blue bar indicates one standard deviation from the mean. -
- > - } - > - {getLabel("rowsWritten")} -