dant3 commented on code in PR #7387:
URL: https://github.com/apache/ignite-3/pull/7387#discussion_r2811753785


##########
modules/file-io/src/main/java/org/apache/ignite/internal/fileio/FileIoMetrics.java:
##########
@@ -15,16 +15,25 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.internal.cli.core.style;
+package org.apache.ignite.internal.fileio;
 
 /**
- * Provider for the current color scheme.
+ * Metrics for file I/O operations.
  */
-public interface ColorSchemeProvider {
+public interface FileIoMetrics {
     /**
-     * Returns the current color scheme.
+     * Records a read operation.
      *
-     * @return Current color scheme, never null.
+     * @param bytesRead Number of bytes read (positive on success, 0 for EOF, 
-1 on error).
+     * @param durationNanos Operation duration in nanoseconds.
      */
-    ColorScheme colorScheme();
+    void recordRead(int bytesRead, long durationNanos);
+
+    /**
+     * Records a write operation.
+     *
+     * @param bytesWritten Number of bytes written (positive on success, 0 or 
-1 on error).

Review Comment:
   0 means nothing was read/written. Its not an error. For example while 
reading you reached end of the data stream, or you were trying to write in 
non-blocking channel but that channel couldn't write anything without blocking 
and hence gently refused to write. All of that are standard java nio behaviour.



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