/// <summary> /// Tracks when 'command' is started. /// </summary> public void ExecuteStartImpl(DbCommand command, ExecuteType type) { var id = Tuple.Create((object)command, type); var sqlTiming = new SqlTiming(command, type, Profiler); _inProgress[id] = sqlTiming; }
/// <summary> /// Adds the parameter 'sqlTiming' to this Timing's SqlTimings collection. /// </summary> /// <param name="sqlTiming">A sql statement profiling that was executed in this Timing step.</param> /// <remarks> /// Used outside this assembly for custom deserialization when creating an <see cref="IStorage"/> implementation. /// </remarks> public void AddSqlTiming(SqlTiming sqlTiming) { if (SqlTimings == null) { SqlTimings = new List <SqlTiming>(); } SqlTimings.Add(sqlTiming); sqlTiming.ParentTiming = this; }
/// <summary> /// Adds <paramref name="stats"/> to the current <see cref="Timing"/>. /// </summary> internal void AddSqlTiming(SqlTiming stats) { if (Head == null) { return; } int count; stats.IsDuplicate = _sqlExecutionCounts.TryGetValue(stats.CommandString, out count); _sqlExecutionCounts[stats.CommandString] = count + 1; HasSqlTimings = true; if (stats.IsDuplicate) { HasDuplicateSqlTimings = true; } Head.AddSqlTiming(stats); }
/// <summary> /// Adds <paramref name="stats"/> to the current <see cref="Timing"/>. /// </summary> internal void AddSqlTiming(SqlTiming stats) { if (Head == null) return; int count; stats.IsDuplicate = _sqlExecutionCounts.TryGetValue(stats.CommandString, out count); _sqlExecutionCounts[stats.CommandString] = count + 1; HasSqlTimings = true; if (stats.IsDuplicate) { HasDuplicateSqlTimings = true; } Head.AddSqlTiming(stats); }
/// <summary> /// Adds the parameter 'sqlTiming' to this Timing's SqlTimings collection. /// </summary> /// <param name="sqlTiming">A sql statement profiling that was executed in this Timing step.</param> /// <remarks> /// Used outside this assembly for custom deserialization when creating an <see cref="IStorage"/> implementation. /// </remarks> public void AddSqlTiming(SqlTiming sqlTiming) { if (SqlTimings == null) SqlTimings = new List<SqlTiming>(); SqlTimings.Add(sqlTiming); sqlTiming.ParentTiming = this; }