Skip to main content

SqlTiming

Profiles a single sql execution.

Assembly: ServiceStack.NetFramework.dll​
View Source​
Declaration
[ExcludeMetadata]
[DataContract]
public class SqlTiming

Properties​

Id​

Unique identifier for this SqlTiming.

View Source​
Declaration
public Guid Id { get; set; }

ExecuteType​

Category of sql statement executed.

View Source​
Declaration
[DataMember(Order = 1, Name = "ExecuteType")]
public ExecuteType ExecuteType { get; set; }

CommandString​

The sql that was executed.

View Source​
Declaration
[DataMember(Order = 2, Name = "CommandString")]
public string CommandString { get; set; }

FormattedCommandString​

The command string with special formatting applied based on MiniProfiler.Settings.SqlFormatter

View Source​
Declaration
[DataMember(Order = 3, Name = "FormattedCommandString")]
public string FormattedCommandString { get; }

StackTraceSnippet​

Roughly where in the calling code that this sql was executed.

View Source​
Declaration
[DataMember(Order = 4, Name = "StackTraceSnippet")]
public string StackTraceSnippet { get; set; }

StartMilliseconds​

Offset from main MiniProfiler start that this sql began.

View Source​
Declaration
[DataMember(Order = 5, Name = "StartMilliseconds")]
public decimal StartMilliseconds { get; set; }

DurationMilliseconds​

How long this sql statement took to execute.

View Source​
Declaration
[DataMember(Order = 6, Name = "DurationMilliseconds")]
public decimal DurationMilliseconds { get; set; }

FirstFetchDurationMilliseconds​

When executing readers, how long it took to come back initially from the database, before all records are fetched and reader is closed.

View Source​
Declaration
[DataMember(Order = 7, Name = "FirstFetchDurationMilliseconds")]
public decimal FirstFetchDurationMilliseconds { get; set; }

Parameters​

Stores any parameter names and values used by the profiled DbCommand.

View Source​
Declaration
[DataMember(Order = 8, Name = "Parameters")]
public List<SqlTimingParameter> Parameters { get; set; }

ParentTimingId​

Id of the Timing this statement was executed in.

View Source​
Declaration
[DataMember(Order = 9, Name = "ParentTimingId")]
public Guid? ParentTimingId { get; set; }

ParentTiming​

The Timing step that this sql execution occurred in.

View Source​
Declaration
public Timing ParentTiming { get; set; }

IsDuplicate​

True when other identical sql statements have been executed during this MiniProfiler session.

View Source​
Declaration
[DataMember(Order = 10, Name = "IsDuplicate")]
public bool IsDuplicate { get; set; }

Methods​

ToString()​

Returns a snippet of the sql command and the duration.

View Source​
Declaration
public override string ToString()
Returns​

System.String

Equals(Object)​

Returns true if Ids match.

View Source​
Declaration
public override bool Equals(object obj)
Returns​

System.Boolean

Parameters​
TypeName
System.Objectobj

GetHashCode()​

Returns hashcode of Id.

View Source​
Declaration
public override int GetHashCode()
Returns​

System.Int32

ExecutionComplete(Boolean)​

Called when command execution is finished to determine this SqlTiming's duration.

View Source​
Declaration
public void ExecutionComplete(bool isReader)
Parameters​
TypeName
System.BooleanisReader

ReaderFetchComplete()​

Called when database reader is closed, ending profiling for ServiceStack.MiniProfiler.Data.ExecuteType.Reader SqlTimings.

View Source​
Declaration
public void ReaderFetchComplete()