ibessonov commented on code in PR #6369: URL: https://github.com/apache/ignite-3/pull/6369#discussion_r2254633412
########## 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: `Math.max(1, durationInSeconds)` - what does it mean? ########## 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: Nooo, you should have used microseconds, you made the calculation less precise now. Can you please improve 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org