siddharthteotia commented on a change in pull request #6886:
URL: https://github.com/apache/incubator-pinot/pull/6886#discussion_r629773754



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/InstanceResponseOperator.java
##########
@@ -45,8 +46,39 @@ protected InstanceResponseBlock getNextBlock() {
     DataTable dataTable = instanceResponseBlock.getInstanceResponseDataTable();
 
     mainThreadTimer.stop();
-    long totalThreadCpuTimeNs =
-        intermediateResultsBlock.getExecutionThreadCpuTimeNs() + 
mainThreadTimer.getThreadTimeNs();
+    long endWallClockTimeNs = System.nanoTime();
+
+    long singleThreadCpuTimeNs = mainThreadTimer.getThreadTimeNs();
+    long multipleThreadCpuTimeNs = 
intermediateResultsBlock.getExecutionThreadCpuTimeNs();
+    long totalThreadCpuTimeNs = singleThreadCpuTimeNs + 
multipleThreadCpuTimeNs;
+    long totalWallClockTimeNs = endWallClockTimeNs - startWallClockTimeNs;

Review comment:
       @mqliang , let's please also add a note saying that --  if/when the 
threadCpuTime based instrumentation is done for other parts of execution 
(planning, pruning etc), we will have to change the wallClockTime computation 
accordingly. Right now everything under InstanceResponseOperator is the one 
that is instrumented with threadCpuTime. So, the wallClockTime is also measured 
here for adjustment. 




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

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



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

Reply via email to