You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "walterddr (via GitHub)" <gi...@apache.org> on 2023/03/21 17:11:57 UTC

[GitHub] [pinot] walterddr commented on a diff in pull request #10450: Bug fix: Start counting operator execution time from first NoOp block

walterddr commented on code in PR #10450:
URL: https://github.com/apache/pinot/pull/10450#discussion_r1143746039


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MultiStageOperator.java:
##########
@@ -64,8 +65,15 @@ public TransferableBlock nextBlock() {
     try (InvocationScope ignored = Tracing.getTracer().createScope(getClass())) {
       _operatorStats.startTimer();
       TransferableBlock nextBlock = getNextBlock();
+
+      if (!_firstDataBlockEncountered && nextBlock.isNoOpBlock()) {
+        _operatorStats.resetStartTime();
+      } else {
+        _firstDataBlockEncountered = true;
+        _operatorStats.endTimer();
+      }
+

Review Comment:
   Let's do it differently
   
   ```suggestion
         _operatorStats.startTimer();
         TransferableBlock nextBlock = getNextBlock();
         _operatorStats.endTimer(nextBlock);
   ```



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org