tkalkirill commented on code in PR #6369:
URL: https://github.com/apache/ignite-3/pull/6369#discussion_r2256495671


##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/Checkpointer.java:
##########
@@ -407,8 +408,8 @@ void doCheckpoint() throws IgniteInternalCheckedException {
 
             if (chp.hasDelta()) {
                 if (log.isInfoEnabled()) {
-                    float totalDurationInSeconds = 
tracker.checkpointDuration(MILLISECONDS) / 1000.0f;
-                    float avgWriteSpeedInBytes = ((long) pageSize * 
chp.dirtyPagesSize) / totalDurationInSeconds;
+                    long totalDurationInSeconds = 
tracker.checkpointDuration(SECONDS);

Review Comment:
   Fix it.



##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/WriteSpeedFormatter.java:
##########
@@ -48,14 +48,25 @@ private WriteSpeedFormatter() {
         // no-op
     }
 
+    /**
+     * Format write speed in MB/sec.
+     *
+     * @param bytes Total number of bytes.
+     * @param durationInSeconds Duration in seconds.
+     * @return Formatted write speed.
+     */
+    public static String formatWriteSpeed(long bytes, long durationInSeconds) {
+        return formatWriteSpeed((double) bytes / Math.max(1, 
durationInSeconds));

Review Comment:
   Fix it.



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