You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by GitBox <gi...@apache.org> on 2022/08/18 05:18:45 UTC

[GitHub] [orc] wgtmac commented on a diff in pull request #1223: ORC-1252:[C++] Expose IO metrics for write operation

wgtmac commented on code in PR #1223:
URL: https://github.com/apache/orc/pull/1223#discussion_r948658168


##########
c++/include/orc/Writer.hh:
##########
@@ -46,6 +47,13 @@ namespace orc {
 
   class Timezone;
 
+  /**
+   * Expose the IO metrics for write operation.
+   */
+  struct WriterMetrics {
+    std::atomic<uint64_t> IOCount{0};

Review Comment:
   Add some comment to explain them



##########
c++/src/OrcFile.cc:
##########
@@ -161,6 +163,7 @@ DIAGNOSTIC_POP
     }
 
     void write(const void* buf, size_t length) override {
+      SCOPED_STOPWATCH(metrics, IOBlockingLatencyUs, IOCount);

Review Comment:
   This may not be the right place. We should measure where it is called. Otherwise we cannot support HDFS and other file systems.



##########
c++/include/orc/Writer.hh:
##########
@@ -28,6 +28,7 @@
 #include <set>
 #include <string>
 #include <vector>
+#include <atomic>

Review Comment:
   please sort alphabetically.



-- 
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: issues-unsubscribe@orc.apache.org

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