Skip to content

Commit

Permalink
ui: format rows processed
Browse files Browse the repository at this point in the history
Previously, the rows processed could show a really
long number. This commit adds formatting to it, so
it can have the proper unit.

Release note: None
  • Loading branch information
maryliag committed Jun 30, 2022
1 parent 9519f05 commit 45cf797
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
longToInt,
StatementSummary,
StatementStatistics,
Count,
} from "src/util";
import {
countBarChart,
Expand Down Expand Up @@ -106,7 +107,7 @@ function makeCommonColumns(
title: statisticsTableTitles.rowsProcessed(statType),
className: cx("statements-table__col-rows-read"),
cell: (stmt: AggregateStatistics) =>
`${FixLong(Number(stmt.stats.rows_read.mean))} Reads / ${FixLong(
`${Count(Number(stmt.stats.rows_read.mean))} Reads / ${Count(
Number(stmt.stats.rows_written?.mean),
)} Writes`,
sort: (stmt: AggregateStatistics) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
import { statisticsTableTitles } from "../statsTableUtil/statsTableUtil";
import { tableClasses } from "./transactionsTableClasses";
import { transactionLink } from "./transactionsCells";
import { FixLong, longToInt, TimestampToString } from "src/util";
import { Count, FixLong, longToInt, TimestampToString } from "src/util";
import { SortSetting } from "../sortedtable";
import {
getStatementsByFingerprintId,
Expand Down Expand Up @@ -156,9 +156,7 @@ export function makeTransactionsColumns(
name: "rowsProcessed",
title: statisticsTableTitles.rowsProcessed(statType),
cell: (item: TransactionInfo) =>
`${FixLong(
Number(item.stats_data.stats.rows_read.mean),
)} Reads / ${FixLong(
`${Count(Number(item.stats_data.stats.rows_read.mean))} Reads / ${Count(
Number(item.stats_data.stats.rows_written?.mean),
)} Writes`,
className: cx("statements-table__col-rows-read"),
Expand Down

0 comments on commit 45cf797

Please sign in to comment.