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/03 04:02:44 UTC

[GitHub] [orc] coderex2522 opened a new pull request, #1206: ORC-1232:[C++] disable the metrics collector at compile phase

coderex2522 opened a new pull request, #1206:
URL: https://github.com/apache/orc/pull/1206

   ### What changes were proposed in this pull request?
   The patch will disable the metrics collector at the compile time.
   
   
   ### Why are the changes needed?
   The metrics collector could cause performance degradation in some [cases](https://issues.apache.org/jira/projects/ORC/issues/ORC-1232).
   
   
   ### How was this patch tested?
   The option BUILD_CPP_ENABLE_METRICS set to ON will triggers  the related UTs.


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


[GitHub] [orc] wgtmac commented on a diff in pull request #1206: ORC-1232:[C++] disable the metrics collector at compile phase

Posted by GitBox <gi...@apache.org>.
wgtmac commented on code in PR #1206:
URL: https://github.com/apache/orc/pull/1206#discussion_r936755932


##########
c++/src/Utils.hh:
##########
@@ -60,16 +60,27 @@ public:
   }
 };
 
-#define SCOPED_STOPWATCH(METRICS_PTR, LATENCY_VAR, COUNT_VAR)         \
-  AutoStopwatch measure(                                              \
-    (METRICS_PTR == nullptr ? nullptr : &METRICS_PTR->LATENCY_VAR),   \
+#if ENABLE_METRICS
+#define SCOPED_STOPWATCH(METRICS_PTR, LATENCY_VAR, COUNT_VAR)               \
+  AutoStopwatch measure(                                                    \
+    (METRICS_PTR == nullptr ? nullptr : &METRICS_PTR->LATENCY_VAR),         \
     (METRICS_PTR == nullptr ? nullptr : &METRICS_PTR->COUNT_VAR))
 
-#define SCOPED_MINUS_STOPWATCH(METRICS_PTR, LATENCY_VAR)              \
-  AutoStopwatch measure(                                              \
-    (METRICS_PTR == nullptr ? nullptr : &METRICS_PTR->LATENCY_VAR),   \
+#define SCOPED_MINUS_STOPWATCH(METRICS_PTR, LATENCY_VAR)                    \
+  AutoStopwatch measure(                                                    \
+    (METRICS_PTR == nullptr ? nullptr : &METRICS_PTR->LATENCY_VAR),         \
     nullptr, true)
+#else
+#define SCOPED_STOPWATCH(METRICS_PTR, LATENCY_VAR, COUNT_VAR)               \

Review Comment:
   If we define the macro as below, the change would be trivial. We can always assign metrics to getDefaultReaderMetrics() and it will not get updated if the macro is disabled.
   
   `#define SCOPED_STOPWATCH(METRICS_PTR, LATENCY_VAR, COUNT_VAR) `
   `#define SCOPED_MINUS_STOPWATCH(METRICS_PTR, LATENCY_VAR)`



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


[GitHub] [orc] dongjoon-hyun commented on a diff in pull request #1206: ORC-1232:[C++] disable the metrics collector at compile phase

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #1206:
URL: https://github.com/apache/orc/pull/1206#discussion_r938609347


##########
c++/src/Utils.hh:
##########
@@ -69,7 +70,10 @@ public:
   AutoStopwatch measure(                                              \
     (METRICS_PTR == nullptr ? nullptr : &METRICS_PTR->LATENCY_VAR),   \
     nullptr, true)
+#else
+#define SCOPED_STOPWATCH(METRICS_PTR, LATENCY_VAR, COUNT_VAR)
+#define SCOPED_MINUS_STOPWATCH(METRICS_PTR, LATENCY_VAR)
+#endif
 
 }
-

Review Comment:
   nit. Shall we recover this irrelevant removal?



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


[GitHub] [orc] dongjoon-hyun closed pull request #1206: ORC-1232:[C++] Disable the metrics collector at compile phase

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #1206: ORC-1232:[C++] Disable the metrics collector at compile phase
URL: https://github.com/apache/orc/pull/1206


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


[GitHub] [orc] dongjoon-hyun commented on pull request #1206: ORC-1232:[C++] disable the metrics collector at compile phase

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on PR #1206:
URL: https://github.com/apache/orc/pull/1206#issuecomment-1205530655

   Could you take a look at this too, @stiga-huang ?


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