ibessonov commented on code in PR #6692:
URL: https://github.com/apache/ignite-3/pull/6692#discussion_r2405856249


##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryDataRegion.java:
##########
@@ -459,10 +462,30 @@ private void initMetrics() {
         ));
     }
 
+    /**
+     * Registers region-specific metrics for the given table.
+     *
+     * @param tableDescriptor Table descriptor.
+     * @param metricConsumer Abstract metric consumer for registering metrics.
+     */
+    void addTableMetrics(StorageTableDescriptor tableDescriptor, 
Consumer<Metric> metricConsumer) {
+        PersistentPageMemoryTableStorage tableStorage = 
tableStorages.get(tableDescriptor.getId());
+
+        assert tableStorage != null : "Adding metrics for a non-existent 
table: " + tableDescriptor;
+
+        metricConsumer.accept(new LongGauge(
+                "TotalAllocatedSize",
+                "desc",
+                () -> pageSize * tableStorage.mvPartitionStorages.stream()

Review Comment:
   Sure



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to