Ejemplo n.º 1
0
 public Object visit(SqlStatementsCommand command) {
   List<SqlStatementInfo> list = new ArrayList<SqlStatementInfo>();
   for (MutableSqlStatementInfo info : sqlStatementMap.values()) {
     list.add(info.fix());
   }
   return list;
 }
Ejemplo n.º 2
0
    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;
    }
Ejemplo n.º 3
0
 private void foo(MutableSqlStatementInfo sql, SqlStatementEndEvent event) {
   ++sql.endCount;
   sql.rowFetchCount += event.rowFetchCount;
 }
Ejemplo n.º 4
0
 private void foo(MutableSqlStatementInfo sql, SqlStatementExecuteEvent event) {
   ++sql.executeCount;
   sql.executeNanos += event.executeNanos;
 }
Ejemplo n.º 5
0
 private void foo(MutableSqlStatementInfo sql, SqlStatementStartEvent event) {
   ++sql.startCount;
   sql.cellRequestCount += event.cellRequestCount;
 }