Skip to content

Commit feb4d92

Browse files
committed
Show total read/written blocks size in IO grid (tooltip)
Fixes dalibo#814
1 parent 918cf0e commit feb4d92

5 files changed

Lines changed: 27 additions & 0 deletions

File tree

src/components/IoTimingsRow.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"
99
import { directive as vTippy } from "vue-tippy"
1010
import { HelpService } from "@/services/help-service"
1111
import { faInfoCircle } from "@fortawesome/free-solid-svg-icons"
12+
import { blocksAsBytes } from "@/filters"
1213
import useNode from "@/node"
1314
1415
interface Props {
@@ -38,13 +39,19 @@ const readSpeedProp = (exclusivePrefix +
3839
"AVERAGE_" +
3940
scope +
4041
"IO_READ_SPEED") as keyof typeof NodeProp
42+
const readBlocksProp = (exclusivePrefix +
43+
scope +
44+
"READ_BLOCKS") as keyof typeof NodeProp
4145
const writeTimeProp = (exclusivePrefix +
4246
scope +
4347
"IO_WRITE_TIME") as keyof typeof NodeProp
4448
const writeSpeedProp = (exclusivePrefix +
4549
"AVERAGE_" +
4650
scope +
4751
"IO_WRITE_SPEED") as keyof typeof NodeProp
52+
const writtenBlocksProp = (exclusivePrefix +
53+
scope +
54+
"WRITTEN_BLOCKS") as keyof typeof NodeProp
4855
</script>
4956

5057
<template>
@@ -53,6 +60,10 @@ const writeSpeedProp = (exclusivePrefix +
5360
<td class="text-end" v-if="node[NodeProp[readTimeProp]]">
5461
{{ formattedProp(readTimeProp) }}
5562
<br />
63+
<small>{{
64+
blocksAsBytes(node[NodeProp[readBlocksProp]] as number)
65+
}}</small>
66+
<br />
5667
<small>~{{ formattedProp(readSpeedProp) }}</small>
5768
<FontAwesomeIcon
5869
:icon="faInfoCircle"
@@ -70,6 +81,10 @@ const writeSpeedProp = (exclusivePrefix +
7081
<td class="text-end" v-if="node[NodeProp[writeTimeProp]]">
7182
{{ formattedProp(writeTimeProp) }}
7283
<br />
84+
<small>{{
85+
blocksAsBytes(node[NodeProp[writtenBlocksProp]] as number)
86+
}}</small>
87+
<br />
7388
<small>~{{ formattedProp(writeSpeedProp) }}</small>
7489
</td>
7590
<td class="text-end" v-else>-</td>

src/enums.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ export enum NodeProp {
7878
WORKERS_LAUNCHED = "Workers Launched",
7979
SHARED_HIT_BLOCKS = "Shared Hit Blocks",
8080
SHARED_READ_BLOCKS = "Shared Read Blocks",
81+
READ_BLOCKS = "*Read Blocks",
8182
SHARED_DIRTIED_BLOCKS = "Shared Dirtied Blocks",
8283
SHARED_WRITTEN_BLOCKS = "Shared Written Blocks",
84+
WRITTEN_BLOCKS = "*Written Blocks",
8385
TEMP_READ_BLOCKS = "Temp Read Blocks",
8486
TEMP_WRITTEN_BLOCKS = "Temp Written Blocks",
8587
LOCAL_HIT_BLOCKS = "Local Hit Blocks",
@@ -133,6 +135,8 @@ export enum NodeProp {
133135
EXCLUSIVE_LOCAL_READ_BLOCKS = "*Local Read Blocks (exclusive)",
134136
EXCLUSIVE_LOCAL_DIRTIED_BLOCKS = "*Local Dirtied Blocks (exclusive)",
135137
EXCLUSIVE_LOCAL_WRITTEN_BLOCKS = "*Local Written Blocks (exclusive)",
138+
EXCLUSIVE_READ_BLOCKS = "*Read Blocks (exclusive)",
139+
EXCLUSIVE_WRITTEN_BLOCKS = "*Written Blocks (exclusive)",
136140

137141
AVERAGE_IO_READ_SPEED = "*I/O Read Speed",
138142
AVERAGE_IO_WRITE_SPEED = "*I/O Write Speed",

src/interfaces.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ export class Node {
8989
[NodeProp.EXCLUSIVE_SHARED_HIT_BLOCKS]!: number;
9090
[NodeProp.EXCLUSIVE_SHARED_READ_BLOCKS]!: number;
9191
[NodeProp.EXCLUSIVE_SHARED_WRITTEN_BLOCKS]!: number;
92+
[NodeProp.EXCLUSIVE_READ_BLOCKS]!: number;
93+
[NodeProp.EXCLUSIVE_WRITTEN_BLOCKS]!: number;
9294
[NodeProp.EXCLUSIVE_TEMP_READ_BLOCKS]!: number;
9395
[NodeProp.EXCLUSIVE_TEMP_WRITTEN_BLOCKS]!: number;
9496
[NodeProp.FILTER]!: string;

src/services/help-service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ const notMiscProperties: string[] = [
310310
NodeProp.WORKERS,
311311
NodeProp.WORKERS_PLANNED,
312312
NodeProp.WORKERS_LAUNCHED,
313+
NodeProp.READ_BLOCKS,
314+
NodeProp.WRITTEN_BLOCKS,
313315
NodeProp.EXCLUSIVE_SHARED_HIT_BLOCKS,
314316
NodeProp.EXCLUSIVE_SHARED_READ_BLOCKS,
315317
NodeProp.EXCLUSIVE_SHARED_DIRTIED_BLOCKS,
@@ -320,6 +322,8 @@ const notMiscProperties: string[] = [
320322
NodeProp.EXCLUSIVE_LOCAL_READ_BLOCKS,
321323
NodeProp.EXCLUSIVE_LOCAL_DIRTIED_BLOCKS,
322324
NodeProp.EXCLUSIVE_LOCAL_WRITTEN_BLOCKS,
325+
NodeProp.EXCLUSIVE_READ_BLOCKS,
326+
NodeProp.EXCLUSIVE_WRITTEN_BLOCKS,
323327
NodeProp.SHARED_HIT_BLOCKS,
324328
NodeProp.SHARED_READ_BLOCKS,
325329
NodeProp.SHARED_DIRTIED_BLOCKS,

src/services/plan-service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,8 @@ export class PlanService {
14061406
`${prefix}${bufferScope}_${buffersOperation}_blocks`.toUpperCase() as keyof typeof NodeProp
14071407
return (node[NodeProp[bufferProp]] as number) || 0
14081408
})
1409+
const buffersProp = `${prefix}${buffersOperation}_blocks`.toUpperCase() as keyof typeof NodeProp;
1410+
node[NodeProp[buffersProp] as unknown as keyof typeof Node] = buffers;
14091411
if (time) {
14101412
node[NodeProp[speedProp] as unknown as keyof typeof Node] = Number(
14111413
(buffers / (time / 1000)).toFixed(3),

0 commit comments

Comments
 (0)