C# Class StackExchange.Profiling.Timing

Inheritance: IDisposable
Show file Open project: appacitive/Profiling Class Usage Examples

Private Properties

Property Type Description
GetExecutedCount int
IDisposable void
Timing System

Public Methods

Method Description
AddChild ( Timing timing ) : void

Add the parameter 'timing' to this Timing's Children collection.

Used outside this assembly for custom deserialization when creating an Storage.IStorage implementation.

AddKeyValue ( string key, string value ) : void

Adds arbitrary string 'value' under 'key', allowing custom properties to be stored in this Timing step.

AddSqlTiming ( SqlTiming sqlTiming ) : void

Adds the parameter 'sqlTiming' to this Timing's SqlTimings collection.

Used outside this assembly for custom deserialization when creating an Storage.IStorage implementation.

Equals ( object obj ) : bool

Returns true if Ids match.

GetHashCode ( ) : int

Returns hashcode of Id.

RebuildParentTimings ( ) : void

Rebuilds all the parent timings on deserialization calls

Stop ( ) : void

Completes this Timing's duration and sets the MiniProfiler's Head up one level.

Timing ( StackExchange.Profiling.MiniProfiler profiler, Timing parent, string name ) : System

Creates a new Timing named 'name' in the 'profiler's session, with 'parent' as this Timing's immediate ancestor.

ToString ( ) : string

Returns this Timing's Name.

Private Methods

Method Description
GetExecutedCount ( ExecuteType type ) : int

Returns the number of sql statements of type that were executed in this Timing.

IDisposable ( ) : void
Timing ( ) : System

Method Details

AddChild() public method

Add the parameter 'timing' to this Timing's Children collection.
Used outside this assembly for custom deserialization when creating an Storage.IStorage implementation.
public AddChild ( Timing timing ) : void
timing Timing
return void

AddKeyValue() public method

Adds arbitrary string 'value' under 'key', allowing custom properties to be stored in this Timing step.
public AddKeyValue ( string key, string value ) : void
key string
value string
return void

AddSqlTiming() public method

Adds the parameter 'sqlTiming' to this Timing's SqlTimings collection.
Used outside this assembly for custom deserialization when creating an Storage.IStorage implementation.
public AddSqlTiming ( SqlTiming sqlTiming ) : void
sqlTiming SqlTiming A sql statement profiling that was executed in this Timing step.
return void

Equals() public method

Returns true if Ids match.
public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

Returns hashcode of Id.
public GetHashCode ( ) : int
return int

RebuildParentTimings() public method

Rebuilds all the parent timings on deserialization calls
public RebuildParentTimings ( ) : void
return void

Stop() public method

Completes this Timing's duration and sets the MiniProfiler's Head up one level.
public Stop ( ) : void
return void

Timing() public method

Creates a new Timing named 'name' in the 'profiler's session, with 'parent' as this Timing's immediate ancestor.
public Timing ( StackExchange.Profiling.MiniProfiler profiler, Timing parent, string name ) : System
profiler StackExchange.Profiling.MiniProfiler
parent Timing
name string
return System

ToString() public method

Returns this Timing's Name.
public ToString ( ) : string
return string