You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2025/03/18 11:07:52 UTC

(iotdb) branch master updated: feat: move costTime to execute finished

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 411f45f99a2 feat: move costTime to execute finished
411f45f99a2 is described below

commit 411f45f99a2fa0a6ed4599cc8e0ec0317b81833b
Author: CritasWang <cr...@outlook.com>
AuthorDate: Tue Mar 18 19:07:45 2025 +0800

    feat: move costTime to execute finished
---
 iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java b/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java
index 2ea63dbaaf0..2bd92be02b9 100644
--- a/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java
+++ b/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java
@@ -569,6 +569,7 @@ public abstract class AbstractCli {
       ZoneId zoneId = ZoneId.of(connection.getTimeZone());
       statement.setFetchSize(fetchSize);
       boolean hasResultSet = statement.execute(cmd.trim());
+      long costTime = System.currentTimeMillis() - startTime;
       updateSqlDialectAndUsingDatabase(
           connection.getParams().getSqlDialect(), connection.getParams().getDb().orElse(null));
       if (hasResultSet) {
@@ -580,7 +581,6 @@ public abstract class AbstractCli {
           List<List<String>> lists =
               cacheResult(ctx, resultSet, maxSizeList, columnLength, resultSetMetaData, zoneId);
           output(ctx, lists, maxSizeList);
-          long costTime = System.currentTimeMillis() - startTime;
           ctx.getPrinter().println(String.format("It costs %.3fs", costTime / 1000.0));
           while (!isReachEnd) {
             if (continuePrint) {