You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by li...@apache.org on 2019/05/24 13:17:18 UTC
[incubator-iotdb] 01/01: add log in TSServiceImpl
This is an automated email from the ASF dual-hosted git repository.
liurui pushed a commit to branch zc_test
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit 1d7c8ea66a85b359c81c9d8309799545d44f1792
Author: liuruiyiyang <24...@qq.com>
AuthorDate: Fri May 24 21:07:57 2019 +0800
add log in TSServiceImpl
---
iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java b/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
index b02f1c2..e4b8f61 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
@@ -484,6 +484,7 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
@Override
public TSExecuteStatementResp executeStatement(TSExecuteStatementReq req) throws TException {
+ long start = System.currentTimeMillis();
try {
if (!checkLogin()) {
LOGGER.info(INFO_NOT_LOGIN, IoTDBConstant.GLOBAL_DB_NAME);
@@ -524,6 +525,8 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
if (physicalPlan.isQuery()) {
return executeQueryStatement(req);
} else {
+ long elapse = System.currentTimeMillis() - start;
+ LOGGER.info("executeStatement() start to executeUpdateStatement() cost ,{}, ms", elapse);
return executeUpdateStatement(physicalPlan);
}
} catch (Exception e) {
@@ -737,6 +740,7 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
}
private TSExecuteStatementResp executeUpdateStatement(PhysicalPlan plan) {
+ long start = System.currentTimeMillis();
List<Path> paths = plan.getPaths();
try {
@@ -768,6 +772,8 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
TSOperationHandle operationHandle;
operationHandle = new TSOperationHandle(operationId, false);
resp.setOperationHandle(operationHandle);
+ long elapse = System.currentTimeMillis() - start;
+ LOGGER.info("executeUpdateStatement(PhysicalPlan) cost ,{}, ms", elapse);
return resp;
}