private void HandleCommandEnd(CommandEndEventData eventData) { if (_commands.TryRemove(eventData.CommandId, out var commandMetric)) { commandMetric.Record(eventData); } }
public void Record(CommandEndEventData eventData) { OnStop(); Duration = eventData.Duration; EventMetric.Write(this); }
public void CommandCanceled(DbCommand command, CommandEndEventData eventData) { for (var i = 0; i < _interceptors.Length; i++) { _interceptors[i].CommandCanceled(command, eventData); } }
public DbCommand CommandCreated( CommandEndEventData eventData, DbCommand result) { for (var i = 0; i < _interceptors.Length; i++) { result = _interceptors[i].CommandCreated(eventData, result); } return(result); }
public async Task CommandCanceledAsync( DbCommand command, CommandEndEventData eventData, CancellationToken cancellationToken = default) { for (var i = 0; i < _interceptors.Length; i++) { await _interceptors[i].CommandCanceledAsync(command, eventData, cancellationToken) .ConfigureAwait(false); } }
public override DbCommand CommandCreated(CommandEndEventData eventData, DbCommand result) { return(base.CommandCreated(eventData, result)); }
/// <inheritdoc /> public virtual DbCommand CommandCreated(CommandEndEventData eventData, DbCommand result) => result;
public virtual DbCommand CommandCreated( CommandEndEventData eventData, DbCommand result) { return(result); }
public DbCommand CommandCreated(CommandEndEventData eventData, DbCommand result) { TrackEvent(nameof(CommandCreated), eventData.Connection, eventData.ConnectionId); return(result); }
public override DbCommand CommandCreated(CommandEndEventData eventData, DbCommand result) { AddTransactionTime((int)eventData.Duration.TotalMilliseconds); return(base.CommandCreated(eventData, result)); }