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


##########
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:
   Why? We want to log the average speed in megabytes per second, not megabytes 
per microsecond.
   
   If we leave the "float" with division by 10^-6, we will get strange numbers. 
For example, we wrote 10 pages (16 KB page) in 20 milliseconds, then we will 
get (10 * 16 KB) / (20 / 1000) = 8192000 bytes per second, which will be equal 
to 7.81 megabytes per second, looks wrong. And with the current version we get 
(10 * 16 KB) / 1 = 163840 bytes in seconds, and as a result 0.15 megabytes per 
second. What looks more correct to me so far or did I see it wrong or 
miscalculate somewhere?



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to