You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/05/06 21:17:45 UTC

[GitHub] [incubator-pinot] siddharthteotia commented on a change in pull request #6886: Adjust threadCpuTime calculation

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



##########
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:
       As discussed offline, let's use actual wall clock time which we already have in QueryScheduler. Will have to move out the adjustment code from here to QueryScheduler etc.




-- 
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:
users@infra.apache.org



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