You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/11/13 04:02:40 UTC

[iotdb] branch QueryMetrics updated: change to nanos

This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch QueryMetrics
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/QueryMetrics by this push:
     new f01dd9aeb3 change to nanos
f01dd9aeb3 is described below

commit f01dd9aeb3ea547243c46ceef6c26bdc4c0cfcde
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Sun Nov 13 12:02:32 2022 +0800

    change to nanos
---
 .../org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
index 0307206da1..341728f80c 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
@@ -415,6 +415,7 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
 
   @Override
   public TSFetchResultsResp fetchResultsV2(TSFetchResultsReq req) {
+    long startTimeNanos = System.nanoTime();
     long startTime = System.currentTimeMillis();
     boolean finished = false;
     try {
@@ -451,7 +452,7 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
       if (finished) {
         COORDINATOR.cleanupQueryExecution(req.queryId);
       }
-      QueryStatistics.getInstance().addCost(SERVER_RPC_RT, System.nanoTime() - startTime);
+      QueryStatistics.getInstance().addCost(SERVER_RPC_RT, System.nanoTime() - startTimeNanos);
     }
   }