Craig's Utility Library
4.0 Beta
|
Object class used to profile a function. Create at the beginning of a function in a using statement and it will automatically record the time. Note that this isn't exact and is based on when the object is destroyed More...
Public Member Functions | |
Profiler () | |
Constructor More... | |
Profiler (string FunctionName) | |
Constructor More... | |
void | Dispose () |
Disposes the object More... | |
override bool | Equals (object obj) |
Equals More... | |
override int | GetHashCode () |
Gets the hash code for the profiler More... | |
IDisposable | Profile (string Name) |
Creates a profiler object and starts profiling More... | |
IDisposable | StartProfiling () |
Starts profiling More... | |
void | Stop () |
Stops the timer and registers the information More... | |
IResult | StopProfiling (bool DiscardResults) |
Stops profiling More... | |
override string | ToString () |
Outputs the information to a table More... | |
Static Public Member Functions | |
static bool | operator!= (Profiler First, Profiler Second) |
Compares the profilers and determines if they are not equal More... | |
static bool | operator== (Profiler First, Profiler Second) |
Compares the profilers and determines if they are equal More... | |
static void | Start () |
Starts the timer More... | |
Protected Member Functions | |
virtual void | Dispose (bool Disposing) |
Disposes of the objects More... | |
Properties | |
static Profiler | Current [get, protected set] |
Contains the current profiler More... | |
static Profiler | Root [get, protected set] |
Contains the root profiler More... | |
string | CalledFrom [get, set] |
Where the profiler was started at More... | |
IDictionary< string, IResult > | Children [get] |
Children result items More... | |
ICollection< IResultEntry > | Entries [get] |
Gets the entries. More... | |
string | Function [get, protected set] |
Function name More... | |
IDictionary< string, Profiler > | InternalChildren [get] |
Children profiler items More... | |
int | Level [get, set] |
Level of the profiler More... | |
Profiler | Parent [get, set] |
Parent profiler item More... | |
bool | Running [get, set] |
Determines if it is running More... | |
StopWatch | StopWatch [get, set] |
Stop watch More... | |
Properties inherited from Utilities.Profiler.Manager.Interfaces.IResult | |
string | CalledFrom [get] |
Where the profiler was started at More... | |
IDictionary< string, IResult > | Children [get] |
Any child results (Key = Name/Identifier, Value = IResult object) More... | |
ICollection< IResultEntry > | Entries [get] |
Gets the entries. More... | |
Object class used to profile a function. Create at the beginning of a function in a using statement and it will automatically record the time. Note that this isn't exact and is based on when the object is destroyed
Definition at line 38 of file Profiler.cs.
Utilities.Profiler.Manager.Default.Profiler.Profiler | ( | ) |
Constructor
Definition at line 43 of file Profiler.cs.
Utilities.Profiler.Manager.Default.Profiler.Profiler | ( | string | FunctionName | ) |
void Utilities.Profiler.Manager.Default.Profiler.Dispose | ( | ) |
Disposes the object
Definition at line 287 of file Profiler.cs.
|
protectedvirtual |
Disposes of the objects
Disposing | True to dispose of all resources, false only disposes of native resources |
Definition at line 394 of file Profiler.cs.
override bool Utilities.Profiler.Manager.Default.Profiler.Equals | ( | object | obj | ) |
Equals
obj | Object to compare to |
Definition at line 298 of file Profiler.cs.
override int Utilities.Profiler.Manager.Default.Profiler.GetHashCode | ( | ) |
Gets the hash code for the profiler
Definition at line 310 of file Profiler.cs.
|
static |
Compares the profilers and determines if they are not equal
First | First |
Second | Second |
Definition at line 245 of file Profiler.cs.
|
static |
Compares the profilers and determines if they are equal
First | First |
Second | Second |
Definition at line 256 of file Profiler.cs.
IDisposable Utilities.Profiler.Manager.Default.Profiler.Profile | ( | string | Name | ) |
Creates a profiler object and starts profiling
Name | Function name |
Implements Utilities.Profiler.Manager.Interfaces.IProfiler.
Definition at line 320 of file Profiler.cs.
|
static |
Starts the timer
Definition at line 270 of file Profiler.cs.
IDisposable Utilities.Profiler.Manager.Default.Profiler.StartProfiling | ( | ) |
Starts profiling
Implements Utilities.Profiler.Manager.Interfaces.IProfiler.
Definition at line 329 of file Profiler.cs.
void Utilities.Profiler.Manager.Default.Profiler.Stop | ( | ) |
Stops the timer and registers the information
Definition at line 337 of file Profiler.cs.
IResult Utilities.Profiler.Manager.Default.Profiler.StopProfiling | ( | bool | DiscardResults | ) |
Stops profiling
DiscardResults | Discard results |
Implements Utilities.Profiler.Manager.Interfaces.IProfiler.
Definition at line 362 of file Profiler.cs.
override string Utilities.Profiler.Manager.Default.Profiler.ToString | ( | ) |
Outputs the information to a table
Definition at line 376 of file Profiler.cs.
|
getset |
Where the profiler was started at
Definition at line 142 of file Profiler.cs.
|
get |
Children result items
Definition at line 147 of file Profiler.cs.
|
staticgetprotected set |
Contains the current profiler
Definition at line 101 of file Profiler.cs.
|
get |
|
getprotected set |
Function name
Definition at line 158 of file Profiler.cs.
|
get |
Children profiler items
Definition at line 163 of file Profiler.cs.
|
getsetprotected |
Level of the profiler
Definition at line 168 of file Profiler.cs.
|
getsetprotected |
Parent profiler item
Definition at line 173 of file Profiler.cs.
|
staticgetprotected set |
Contains the root profiler
Definition at line 122 of file Profiler.cs.
|
getsetprotected |
Determines if it is running
Definition at line 178 of file Profiler.cs.
|
getsetprotected |
Stop watch
Definition at line 183 of file Profiler.cs.