SqlTiming
Profiles a single sql execution.
Assembly: ServiceStack.NetFramework.dll
View Source
[ExcludeMetadata]
[DataContract]
public class SqlTiming
Properties
Id
Unique identifier for this SqlTiming.
View Source
public Guid Id { get; set; }
ExecuteType
Category of sql statement executed.
View Source
[DataMember(Order = 1, Name = "ExecuteType")]
public ExecuteType ExecuteType { get; set; }
CommandString
The sql that was executed.
View Source
[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
[DataMember(Order = 3, Name = "FormattedCommandString")]
public string FormattedCommandString { get; }
StackTraceSnippet
Roughly where in the calling code that this sql was executed.
View Source
[DataMember(Order = 4, Name = "StackTraceSnippet")]
public string StackTraceSnippet { get; set; }
StartMilliseconds
Offset from main MiniProfiler start that this sql began.
View Source
[DataMember(Order = 5, Name = "StartMilliseconds")]
public decimal StartMilliseconds { get; set; }
DurationMilliseconds
How long this sql statement took to execute.
View Source
[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
[DataMember(Order = 7, Name = "FirstFetchDurationMilliseconds")]
public decimal FirstFetchDurationMilliseconds { get; set; }
Parameters
Stores any parameter names and values used by the profiled DbCommand.
View Source
[DataMember(Order = 8, Name = "Parameters")]
public List<SqlTimingParameter> Parameters { get; set; }
ParentTimingId
Id of the Timing this statement was executed in.
View Source
[DataMember(Order = 9, Name = "ParentTimingId")]
public Guid? ParentTimingId { get; set; }
ParentTiming
The Timing step that this sql execution occurred in.
View Source
public Timing ParentTiming { get; set; }
IsDuplicate
True when other identical sql statements have been executed during this MiniProfiler session.
View Source
[DataMember(Order = 10, Name = "IsDuplicate")]
public bool IsDuplicate { get; set; }
Methods
ToString()
Returns a snippet of the sql command and the duration.
View Source
public override string ToString()
Returns
System.String
Equals(Object)
Returns true if Ids match.
View Source
public override bool Equals(object obj)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Object | obj |
GetHashCode()
Returns hashcode of Id.
View Source
public override int GetHashCode()
Returns
System.Int32
ExecutionComplete(Boolean)
Called when command execution is finished to determine this SqlTiming's duration.
View Source
public void ExecutionComplete(bool isReader)
Parameters
Type | Name |
---|---|
System.Boolean | isReader |
ReaderFetchComplete()
Called when database reader is closed, ending profiling for ServiceStack.MiniProfiler.Data.ExecuteType.Reader SqlTimings.
View Source
public void ReaderFetchComplete()