Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
83647: ui: format rows processed r=maryliag a=maryliag

Previously, the rows processed could show a really
long number. This commit adds formatting to it, so
it can have the proper unit.

Before
<img width="600" alt="Screen Shot 2022-06-30 at 9 18 26 AM" src="https://user-images.githubusercontent.com/1017486/176693739-3063c940-8d16-436d-84f5-2dbff37a419f.png">

After
<img width="210" alt="Screen Shot 2022-06-30 at 9 44 16 AM" src="https://user-images.githubusercontent.com/1017486/176693816-e78c3ee5-f963-400f-a2de-ee07a78bb4f3.png">



Release note: None

Co-authored-by: Marylia Gutierrez <[email protected]>
  • Loading branch information
craig[bot] and maryliag committed Jul 4, 2022
2 parents c296454 + 45cf797 commit 7a8cac9
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 7a8cac9

Please sign in to comment.