Пример #1
0
        /// <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;
        }
Пример #2
0
        /// <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;
        }
Пример #4
0
        /// <summary>
        /// Adds <paramref name="stats"/> to the current <see cref="Timing"/>.
        /// </summary>
        internal void AddSqlTiming(SqlTiming stats)
        {
            if (Head == null)
            {
                return;
            }


            stats.IsDuplicate = _sqlExecutionCounts.TryGetValue(stats.CommandString, out int 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);
        }
Пример #6
0
        /// <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;
        }