public Object visit(SqlStatementsCommand command) { List<SqlStatementInfo> list = new ArrayList<SqlStatementInfo>(); for (MutableSqlStatementInfo info : sqlStatementMap.values()) { list.add(info.fix()); } return list; }
public Object visit(SqlStatementEndEvent event) { final MutableSqlStatementInfo sql = sqlStatementMap.remove(event.sqlStatementId); if (sql == null) { return missing(event); } foo(sql, event); foo(sql.stmt.aggSql, event); foo(server.aggSql, event); // Since the SQL statement info will no longer be in the table, // broadcast the final info to anyone who is interested. RolapUtil.MONITOR_LOGGER.debug(sql.fix()); return null; }
private void foo(MutableSqlStatementInfo sql, SqlStatementEndEvent event) { ++sql.endCount; sql.rowFetchCount += event.rowFetchCount; }
private void foo(MutableSqlStatementInfo sql, SqlStatementExecuteEvent event) { ++sql.executeCount; sql.executeNanos += event.executeNanos; }
private void foo(MutableSqlStatementInfo sql, SqlStatementStartEvent event) { ++sql.startCount; sql.cellRequestCount += event.cellRequestCount; }