tkalkirill commented on code in PR #6369: URL: https://github.com/apache/ignite-3/pull/6369#discussion_r2255796459
########## 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: This way I eliminate division by zero. -- 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