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



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteSpeedBasedThrottle.java
##########
@@ -228,7 +230,12 @@ public PagesWriteSpeedBasedThrottle(
             doPark(throttleParkTimeNs);
         }
 
-        
pageMemory.metrics().addThrottlingTime(U.nanosToMillis(System.nanoTime() - 
curNanoTime));
+        long duration = System.nanoTime() - curNanoTime;
+
+        pageMemory.metrics().addThrottlingTime(U.nanosToMillis(duration));
+
+        if (pageMemory.performanceStatistics() != null && 
pageMemory.performanceStatistics().enabled())

Review comment:
       Can we move this to `addThrottlingTime` inside page memory metrics?

##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottle.java
##########
@@ -155,6 +160,9 @@ public PagesWriteThrottle(PageMemoryImpl pageMemory,
                 LockSupport.parkNanos(throttleParkTimeNs);
 
             pageMemory.metrics().addThrottlingTime(U.currentTimeMillis() - 
startTime);
+
+            if (performanceStatsEnabled)

Review comment:
       Can we move this to `addThrottlingTime` inside page memory metrics?




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

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


Reply via email to