use of io.mycat.exporter.SqlRecorderRuntime in project Mycat2 by MyCATApache.
the class LogEntryHolder method recordSQLEnd.
public void recordSQLEnd(boolean result, Map<String, Object> targets, String externalMessage) {
try {
Objects.requireNonNull(this.sqlEntry);
long now = System.currentTimeMillis();
long time = now - start;
this.sqlEntry.end(time, LocalDateTime.now(), mycatDataContext.getAffectedRows(), result, targets, externalMessage);
mycatSQLLogMonitor.pushSqlLog(this.sqlEntry);
InstanceMonitor.plusLrt(time);
SqlRecorderRuntime recorderRuntime = MetaClusterCurrent.wrapper(SqlRecorderRuntime.class);
recorderRuntime.addSqlRecord(this.sqlEntry);
} finally {
this.sqlEntry = null;
}
}
Aggregations