chenhao7253886 commented on a change in pull request #531: Add cpu and io
indicates to audit log
URL: https://github.com/apache/incubator-doris/pull/531#discussion_r247772904
##########
File path: fe/src/main/java/org/apache/doris/qe/ConnectProcessor.java
##########
@@ -92,12 +93,16 @@ private void handlePing() {
ctx.getState().setOk();
}
- private void auditAfterExec(String origStmt, StatementBase parsedStmt) {
+ private void auditAfterExec(String origStmt, StatementBase parsedStmt,
+ StmtExecutor.QueryStatistic queryStatistic) {
// slow query
long elapseMs = System.currentTimeMillis() - ctx.getStartTime();
// query state log
ctx.getAuditBuilder().put("state", ctx.getState());
ctx.getAuditBuilder().put("time", elapseMs);
+ Preconditions.checkNotNull(queryStatistic);
+ ctx.getAuditBuilder().put("cpu", queryStatistic.getFormattingCpu());
+ ctx.getAuditBuilder().put("io", queryStatistic.getFormattingIo());
Review comment:
ok, i will fix it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]