Skip to content

Commit a4f4ec2

Browse files
committed
Server:调试模式下输出depth,sql:count等信息
1 parent 0991ece commit a4f4ec2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

APIJSON-Java-Server/APIJSONORM/src/main/java/zuo/biao/apijson/server/AbstractParser.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@ public JSONObject parseResponse(JSONObject request) {
329329
Log.d(TAG, "parseResponse endTime = " + endTime + "; duration = " + (endTime - startTime)
330330
+ ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\n\n");
331331

332+
if (Log.DEBUG) {
333+
requestObject.put("query:depth/max", queryDepth + "/" + getMaxQueryDepth());
334+
requestObject.put("sql:count/max", sqlCount + "/" + getMaxSQLCount());
335+
}
336+
332337
return globleFormat && JSONResponse.isSuccess(requestObject) ? new JSONResponse(requestObject) : requestObject;
333338
}
334339

@@ -1272,7 +1277,7 @@ public synchronized JSONObject executeSQL(@NotNull SQLConfig config, boolean isS
12721277
return sqlObj;//容易丢失信息 JSON.parseObject(config);
12731278
}
12741279

1275-
sqlCount += 1;
1280+
sqlCount += 1;//config.isMain() ? 1 : 0;
12761281
int maxSQLCount = getMaxSQLCount();
12771282
Log.d(TAG, "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \n\n\n 已生成 " + sqlCount + "/" + maxSQLCount + "条 SQL \n\n\n >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
12781283
if (sqlCount > maxSQLCount) {

0 commit comments

Comments
 (0)