From 99f5cb0039e154c332ea7a4410001a30ab373872 Mon Sep 17 00:00:00 2001 From: Vladilen Muzychenko Date: Tue, 8 Jul 2025 13:44:20 +0000 Subject: [PATCH 1/3] Add CS memory stats --- src/components/MemoryViewer/MemoryViewer.scss | 4 +++ src/components/MemoryViewer/i18n/en.json | 4 +++ src/components/MemoryViewer/utils.ts | 28 +++++++++++++++++++ src/types/api/nodes.ts | 12 ++++++++ 4 files changed, 48 insertions(+) diff --git a/src/components/MemoryViewer/MemoryViewer.scss b/src/components/MemoryViewer/MemoryViewer.scss index 57e52380a..13a940bce 100644 --- a/src/components/MemoryViewer/MemoryViewer.scss +++ b/src/components/MemoryViewer/MemoryViewer.scss @@ -3,6 +3,10 @@ $memory-type-colors: ( 'SharedCacheConsumption': var(--g-color-base-info-medium-hover), 'MemTableConsumption': var(--g-color-base-warning-medium-hover), 'QueryExecutionConsumption': var(--g-color-base-positive-medium-hover), + 'ScanGroupedMemoryLimiterConsumption': var(--g-color-base-neutral-medium-hover), + 'CompGroupedMemoryLimiterConsumption': var(--g-color-base-misc-medium-hover), + 'BlobCacheConsumption': var(--g-color-base-light-simple-hover), + 'DataAccessorCacheConsumption': var(--g-color-base-danger-medium-hover), 'Other': var(--g-color-base-generic-medium-hover), ); diff --git a/src/components/MemoryViewer/i18n/en.json b/src/components/MemoryViewer/i18n/en.json index 4f51efc6b..2133568fc 100644 --- a/src/components/MemoryViewer/i18n/en.json +++ b/src/components/MemoryViewer/i18n/en.json @@ -4,6 +4,10 @@ "text_shared-cache": "Shared Cache", "text_memtable": "MemTable", "text_query-execution": "Query Execution", + "text_scan-grouped-memory-limiter": "Scan Grouped Memory Limiter", + "text_comp-grouped-memory-limiter": "Compaction Grouped Memory Limiter", + "text_blob-cache": "Blob Cache", + "text_data-accessor-cache": "Data Accessor Cache", "text_usage": "Usage", "text_soft-limit": "Soft Limit", "text_hard-limit": "Hard Limit", diff --git a/src/components/MemoryViewer/utils.ts b/src/components/MemoryViewer/utils.ts index dc8bed1c3..f812c8a11 100644 --- a/src/components/MemoryViewer/utils.ts +++ b/src/components/MemoryViewer/utils.ts @@ -37,6 +37,34 @@ export function getMemorySegments(stats: TMemoryStats, memoryUsage: number): Mem capacity: getMaybeNumber(stats.QueryExecutionLimit), isInfo: false, }, + { + label: i18n('text_scan-grouped-memory-limiter'), + key: 'ScanGroupedMemoryLimiterConsumption', + value: getMaybeNumber(stats.ScanGroupedMemoryLimiterConsumption), + capacity: getMaybeNumber(stats.ScanGroupedMemoryLimiterLimit), + isInfo: false, + }, + { + label: i18n('text_comp-grouped-memory-limiter'), + key: 'CompGroupedMemoryLimiterConsumption', + value: getMaybeNumber(stats.CompGroupedMemoryLimiterConsumption), + capacity: getMaybeNumber(stats.CompGroupedMemoryLimiterLimit), + isInfo: false, + }, + { + label: i18n('text_blob-cache'), + key: 'BlobCacheConsumption', + value: getMaybeNumber(stats.BlobCacheConsumption), + capacity: getMaybeNumber(stats.BlobCacheLimit), + isInfo: false, + }, + { + label: i18n('text_data-accessor-cache'), + key: 'DataAccessorCacheConsumption', + value: getMaybeNumber(stats.DataAccessorCacheConsumption), + capacity: getMaybeNumber(stats.DataAccessorCacheLimit), + isInfo: false, + }, { label: i18n('text_memtable'), key: 'MemTableConsumption', diff --git a/src/types/api/nodes.ts b/src/types/api/nodes.ts index 2afee29df..c2a8f47ef 100644 --- a/src/types/api/nodes.ts +++ b/src/types/api/nodes.ts @@ -89,6 +89,18 @@ export interface TMemoryStats { QueryExecutionConsumption?: string; QueryExecutionLimit?: string; + ScanGroupedMemoryLimiterConsumption?: string; + ScanGroupedMemoryLimiterLimit?: string; + + CompGroupedMemoryLimiterConsumption?: string; + CompGroupedMemoryLimiterLimit?: string; + + BlobCacheConsumption?: string; + BlobCacheLimit?: string; + + DataAccessorCacheConsumption?: string; + DataAccessorCacheLimit?: string; + HardLimit?: string; SoftLimit?: string; } From 2d192e76f84084a278cac7254895153afe7735ce Mon Sep 17 00:00:00 2001 From: Vladilen Muzychenko Date: Tue, 8 Jul 2025 15:25:25 +0000 Subject: [PATCH 2/3] Fix names --- src/components/MemoryViewer/MemoryViewer.scss | 7 ++--- src/components/MemoryViewer/i18n/en.json | 7 ++--- src/components/MemoryViewer/utils.ts | 31 +++++++------------ src/types/api/nodes.ts | 15 ++++----- 4 files changed, 24 insertions(+), 36 deletions(-) diff --git a/src/components/MemoryViewer/MemoryViewer.scss b/src/components/MemoryViewer/MemoryViewer.scss index 13a940bce..9e5207345 100644 --- a/src/components/MemoryViewer/MemoryViewer.scss +++ b/src/components/MemoryViewer/MemoryViewer.scss @@ -3,10 +3,9 @@ $memory-type-colors: ( 'SharedCacheConsumption': var(--g-color-base-info-medium-hover), 'MemTableConsumption': var(--g-color-base-warning-medium-hover), 'QueryExecutionConsumption': var(--g-color-base-positive-medium-hover), - 'ScanGroupedMemoryLimiterConsumption': var(--g-color-base-neutral-medium-hover), - 'CompGroupedMemoryLimiterConsumption': var(--g-color-base-misc-medium-hover), - 'BlobCacheConsumption': var(--g-color-base-light-simple-hover), - 'DataAccessorCacheConsumption': var(--g-color-base-danger-medium-hover), + 'ColumnTablesReadExecutionConsumption': var(--g-color-base-neutral-medium-hover), + 'ColumnTablesCompactionConsumption': var(--g-color-base-misc-medium-hover), + 'ColumnTablesCacheConsumption': var(--g-color-base-danger-medium-hover), 'Other': var(--g-color-base-generic-medium-hover), ); diff --git a/src/components/MemoryViewer/i18n/en.json b/src/components/MemoryViewer/i18n/en.json index 2133568fc..f83016591 100644 --- a/src/components/MemoryViewer/i18n/en.json +++ b/src/components/MemoryViewer/i18n/en.json @@ -4,10 +4,9 @@ "text_shared-cache": "Shared Cache", "text_memtable": "MemTable", "text_query-execution": "Query Execution", - "text_scan-grouped-memory-limiter": "Scan Grouped Memory Limiter", - "text_comp-grouped-memory-limiter": "Compaction Grouped Memory Limiter", - "text_blob-cache": "Blob Cache", - "text_data-accessor-cache": "Data Accessor Cache", + "text_column-tables-read-execution": "Column Tables Read Execution", + "text_column-tables-compaction": "Column Tables Compaction", + "text_column-tables-cache": "Column Tables Cache", "text_usage": "Usage", "text_soft-limit": "Soft Limit", "text_hard-limit": "Hard Limit", diff --git a/src/components/MemoryViewer/utils.ts b/src/components/MemoryViewer/utils.ts index f812c8a11..040a3ea96 100644 --- a/src/components/MemoryViewer/utils.ts +++ b/src/components/MemoryViewer/utils.ts @@ -38,31 +38,24 @@ export function getMemorySegments(stats: TMemoryStats, memoryUsage: number): Mem isInfo: false, }, { - label: i18n('text_scan-grouped-memory-limiter'), - key: 'ScanGroupedMemoryLimiterConsumption', - value: getMaybeNumber(stats.ScanGroupedMemoryLimiterConsumption), - capacity: getMaybeNumber(stats.ScanGroupedMemoryLimiterLimit), + label: i18n('text_column-tables-read-execution'), + key: 'ColumnTablesReadExecutionConsumption', + value: getMaybeNumber(stats.ColumnTablesReadExecutionConsumption), + capacity: getMaybeNumber(stats.ColumnTablesReadExecutionLimit), isInfo: false, }, { - label: i18n('text_comp-grouped-memory-limiter'), - key: 'CompGroupedMemoryLimiterConsumption', - value: getMaybeNumber(stats.CompGroupedMemoryLimiterConsumption), - capacity: getMaybeNumber(stats.CompGroupedMemoryLimiterLimit), + label: i18n('text_column-tables-compaction'), + key: 'ColumnTablesCompactionConsumption', + value: getMaybeNumber(stats.ColumnTablesCompactionConsumption), + capacity: getMaybeNumber(stats.ColumnTablesCompactionLimit), isInfo: false, }, { - label: i18n('text_blob-cache'), - key: 'BlobCacheConsumption', - value: getMaybeNumber(stats.BlobCacheConsumption), - capacity: getMaybeNumber(stats.BlobCacheLimit), - isInfo: false, - }, - { - label: i18n('text_data-accessor-cache'), - key: 'DataAccessorCacheConsumption', - value: getMaybeNumber(stats.DataAccessorCacheConsumption), - capacity: getMaybeNumber(stats.DataAccessorCacheLimit), + label: i18n('text_column-tables-cache'), + key: 'ColumnTablesCacheConsumption', + value: getMaybeNumber(stats.ColumnTablesCacheConsumption), + capacity: getMaybeNumber(stats.ColumnTablesCacheLimit), isInfo: false, }, { diff --git a/src/types/api/nodes.ts b/src/types/api/nodes.ts index c2a8f47ef..a1cf2c4a3 100644 --- a/src/types/api/nodes.ts +++ b/src/types/api/nodes.ts @@ -89,17 +89,14 @@ export interface TMemoryStats { QueryExecutionConsumption?: string; QueryExecutionLimit?: string; - ScanGroupedMemoryLimiterConsumption?: string; - ScanGroupedMemoryLimiterLimit?: string; + ColumnTablesReadExecutionConsumption?: string; + ColumnTablesReadExecutionLimit?: string; - CompGroupedMemoryLimiterConsumption?: string; - CompGroupedMemoryLimiterLimit?: string; + ColumnTablesCompactionConsumption?: string; + ColumnTablesCompactionLimit?: string; - BlobCacheConsumption?: string; - BlobCacheLimit?: string; - - DataAccessorCacheConsumption?: string; - DataAccessorCacheLimit?: string; + ColumnTablesCacheConsumption?: string; + ColumnTablesCacheLimit?: string; HardLimit?: string; SoftLimit?: string; From 4a8c99815df5b5fbd86bbba94b01bf5a690b0b45 Mon Sep 17 00:00:00 2001 From: Vladilen Muzychenko Date: Wed, 9 Jul 2025 06:53:37 +0000 Subject: [PATCH 3/3] Change positions and colors --- src/components/MemoryViewer/MemoryViewer.scss | 6 +++--- src/components/MemoryViewer/utils.ts | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/MemoryViewer/MemoryViewer.scss b/src/components/MemoryViewer/MemoryViewer.scss index 9e5207345..46fea9b01 100644 --- a/src/components/MemoryViewer/MemoryViewer.scss +++ b/src/components/MemoryViewer/MemoryViewer.scss @@ -3,9 +3,9 @@ $memory-type-colors: ( 'SharedCacheConsumption': var(--g-color-base-info-medium-hover), 'MemTableConsumption': var(--g-color-base-warning-medium-hover), 'QueryExecutionConsumption': var(--g-color-base-positive-medium-hover), - 'ColumnTablesReadExecutionConsumption': var(--g-color-base-neutral-medium-hover), - 'ColumnTablesCompactionConsumption': var(--g-color-base-misc-medium-hover), - 'ColumnTablesCacheConsumption': var(--g-color-base-danger-medium-hover), + 'ColumnTablesReadExecutionConsumption': var(--g-color-base-danger-light), + 'ColumnTablesCompactionConsumption': var(--g-color-base-danger-medium), + 'ColumnTablesCacheConsumption': var(--g-color-base-danger-heavy), 'Other': var(--g-color-base-generic-medium-hover), ); diff --git a/src/components/MemoryViewer/utils.ts b/src/components/MemoryViewer/utils.ts index 040a3ea96..06a36bf58 100644 --- a/src/components/MemoryViewer/utils.ts +++ b/src/components/MemoryViewer/utils.ts @@ -37,6 +37,13 @@ export function getMemorySegments(stats: TMemoryStats, memoryUsage: number): Mem capacity: getMaybeNumber(stats.QueryExecutionLimit), isInfo: false, }, + { + label: i18n('text_memtable'), + key: 'MemTableConsumption', + value: getMaybeNumber(stats.MemTableConsumption), + capacity: getMaybeNumber(stats.MemTableLimit), + isInfo: false, + }, { label: i18n('text_column-tables-read-execution'), key: 'ColumnTablesReadExecutionConsumption', @@ -58,13 +65,6 @@ export function getMemorySegments(stats: TMemoryStats, memoryUsage: number): Mem capacity: getMaybeNumber(stats.ColumnTablesCacheLimit), isInfo: false, }, - { - label: i18n('text_memtable'), - key: 'MemTableConsumption', - value: getMaybeNumber(stats.MemTableConsumption), - capacity: getMaybeNumber(stats.MemTableLimit), - isInfo: false, - }, { label: i18n('text_allocator-caches'), key: 'AllocatorCachesMemory',