Skip to content

Commit 99f5cb0

Browse files
committed
Add CS memory stats
1 parent 7fca511 commit 99f5cb0

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

src/components/MemoryViewer/MemoryViewer.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ $memory-type-colors: (
33
'SharedCacheConsumption': var(--g-color-base-info-medium-hover),
44
'MemTableConsumption': var(--g-color-base-warning-medium-hover),
55
'QueryExecutionConsumption': var(--g-color-base-positive-medium-hover),
6+
'ScanGroupedMemoryLimiterConsumption': var(--g-color-base-neutral-medium-hover),
7+
'CompGroupedMemoryLimiterConsumption': var(--g-color-base-misc-medium-hover),
8+
'BlobCacheConsumption': var(--g-color-base-light-simple-hover),
9+
'DataAccessorCacheConsumption': var(--g-color-base-danger-medium-hover),
610
'Other': var(--g-color-base-generic-medium-hover),
711
);
812

src/components/MemoryViewer/i18n/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
"text_shared-cache": "Shared Cache",
55
"text_memtable": "MemTable",
66
"text_query-execution": "Query Execution",
7+
"text_scan-grouped-memory-limiter": "Scan Grouped Memory Limiter",
8+
"text_comp-grouped-memory-limiter": "Compaction Grouped Memory Limiter",
9+
"text_blob-cache": "Blob Cache",
10+
"text_data-accessor-cache": "Data Accessor Cache",
711
"text_usage": "Usage",
812
"text_soft-limit": "Soft Limit",
913
"text_hard-limit": "Hard Limit",

src/components/MemoryViewer/utils.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,34 @@ export function getMemorySegments(stats: TMemoryStats, memoryUsage: number): Mem
3737
capacity: getMaybeNumber(stats.QueryExecutionLimit),
3838
isInfo: false,
3939
},
40+
{
41+
label: i18n('text_scan-grouped-memory-limiter'),
42+
key: 'ScanGroupedMemoryLimiterConsumption',
43+
value: getMaybeNumber(stats.ScanGroupedMemoryLimiterConsumption),
44+
capacity: getMaybeNumber(stats.ScanGroupedMemoryLimiterLimit),
45+
isInfo: false,
46+
},
47+
{
48+
label: i18n('text_comp-grouped-memory-limiter'),
49+
key: 'CompGroupedMemoryLimiterConsumption',
50+
value: getMaybeNumber(stats.CompGroupedMemoryLimiterConsumption),
51+
capacity: getMaybeNumber(stats.CompGroupedMemoryLimiterLimit),
52+
isInfo: false,
53+
},
54+
{
55+
label: i18n('text_blob-cache'),
56+
key: 'BlobCacheConsumption',
57+
value: getMaybeNumber(stats.BlobCacheConsumption),
58+
capacity: getMaybeNumber(stats.BlobCacheLimit),
59+
isInfo: false,
60+
},
61+
{
62+
label: i18n('text_data-accessor-cache'),
63+
key: 'DataAccessorCacheConsumption',
64+
value: getMaybeNumber(stats.DataAccessorCacheConsumption),
65+
capacity: getMaybeNumber(stats.DataAccessorCacheLimit),
66+
isInfo: false,
67+
},
4068
{
4169
label: i18n('text_memtable'),
4270
key: 'MemTableConsumption',

src/types/api/nodes.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,18 @@ export interface TMemoryStats {
8989
QueryExecutionConsumption?: string;
9090
QueryExecutionLimit?: string;
9191

92+
ScanGroupedMemoryLimiterConsumption?: string;
93+
ScanGroupedMemoryLimiterLimit?: string;
94+
95+
CompGroupedMemoryLimiterConsumption?: string;
96+
CompGroupedMemoryLimiterLimit?: string;
97+
98+
BlobCacheConsumption?: string;
99+
BlobCacheLimit?: string;
100+
101+
DataAccessorCacheConsumption?: string;
102+
DataAccessorCacheLimit?: string;
103+
92104
HardLimit?: string;
93105
SoftLimit?: string;
94106
}

0 commit comments

Comments
 (0)