nizhikov commented on a change in pull request #9209:
URL: https://github.com/apache/ignite/pull/9209#discussion_r661237534



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
##########
@@ -643,6 +657,25 @@ private void cleanup(CacheConfiguration cfg, @Nullable 
Object rsrc, boolean near
             this::partStatesViewSupplier,
             Function.identity()
         );
+
+        ctx.systemView().registerView(
+            CACHE_GRP_IO_VIEW,
+            CACHE_GRP_IO_VIEW_DESC,
+            new CacheGroupIoViewWalker(),
+            () -> F.view(cacheGrps.values(), grp -> !grp.systemCache()),
+            grpCtx -> {
+                MetricRegistry mreg = 
ctx.metric().registry(metricName(IoStatisticsType.CACHE_GROUP.metricGroupName(),
+                    grpCtx.cacheOrGroupName()));
+
+                boolean hasMetrics = mreg.findMetric("grpId") != null;
+
+                return new CacheGroupIoView(
+                    grpCtx,
+                    hasMetrics ? 
mreg.<LongMetric>findMetric(PHYSICAL_READS).value() : 0,

Review comment:
       Let's move this logic inside `CacheGroupIoView` and have simpler 
constructor `return new CacheGroupIoView(grpCtx, mreg)`




-- 
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