Craig's Utility Library  4.0 Beta
Utilities.Profiler.Manager.Default.Profiler Class Reference

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...

Inheritance diagram for Utilities.Profiler.Manager.Default.Profiler:
Utilities.Profiler.Manager.Interfaces.IProfiler Utilities.Profiler.Manager.Interfaces.IResult

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, IResultChildren [get]
 Children result items More...
 
ICollection< IResultEntryEntries [get]
 Gets the entries. More...
 
string Function [get, protected set]
 Function name More...
 
IDictionary< string, ProfilerInternalChildren [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, IResultChildren [get]
 Any child results (Key = Name/Identifier, Value = IResult object) More...
 
ICollection< IResultEntryEntries [get]
 Gets the entries. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

Utilities.Profiler.Manager.Default.Profiler.Profiler ( )

Constructor

Definition at line 43 of file Profiler.cs.

Utilities.Profiler.Manager.Default.Profiler.Profiler ( string  FunctionName)

Constructor

Parameters
FunctionNameFunction/identifier

Definition at line 54 of file Profiler.cs.

Member Function Documentation

void Utilities.Profiler.Manager.Default.Profiler.Dispose ( )

Disposes the object

Definition at line 287 of file Profiler.cs.

virtual void Utilities.Profiler.Manager.Default.Profiler.Dispose ( bool  Disposing)
protectedvirtual

Disposes of the objects

Parameters
DisposingTrue 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

Parameters
objObject to compare to
Returns
True if they are equal, false otherwise

Definition at line 298 of file Profiler.cs.

override int Utilities.Profiler.Manager.Default.Profiler.GetHashCode ( )

Gets the hash code for the profiler

Returns
The hash code

Definition at line 310 of file Profiler.cs.

static bool Utilities.Profiler.Manager.Default.Profiler.operator!= ( Profiler  First,
Profiler  Second 
)
static

Compares the profilers and determines if they are not equal

Parameters
FirstFirst
SecondSecond
Returns
True if they are equal, false otherwise

Definition at line 245 of file Profiler.cs.

static bool Utilities.Profiler.Manager.Default.Profiler.operator== ( Profiler  First,
Profiler  Second 
)
static

Compares the profilers and determines if they are equal

Parameters
FirstFirst
SecondSecond
Returns
True if they are equal, false otherwise

Definition at line 256 of file Profiler.cs.

IDisposable Utilities.Profiler.Manager.Default.Profiler.Profile ( string  Name)

Creates a profiler object and starts profiling

Parameters
NameFunction name
Returns
An IDisposable that is used to stop profiling

Implements Utilities.Profiler.Manager.Interfaces.IProfiler.

Definition at line 320 of file Profiler.cs.

static void Utilities.Profiler.Manager.Default.Profiler.Start ( )
static

Starts the timer

Definition at line 270 of file Profiler.cs.

IDisposable Utilities.Profiler.Manager.Default.Profiler.StartProfiling ( )

Starts profiling

Returns
The root profiler

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

Parameters
DiscardResultsDiscard results
Returns
The root profiler

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

Returns
an html string containing the information

Definition at line 376 of file Profiler.cs.

Property Documentation

string Utilities.Profiler.Manager.Default.Profiler.CalledFrom
getset

Where the profiler was started at

Definition at line 142 of file Profiler.cs.

IDictionary<string, IResult> Utilities.Profiler.Manager.Default.Profiler.Children
get

Children result items

Definition at line 147 of file Profiler.cs.

Profiler Utilities.Profiler.Manager.Default.Profiler.Current
staticgetprotected set

Contains the current profiler

Definition at line 101 of file Profiler.cs.

ICollection<IResultEntry> Utilities.Profiler.Manager.Default.Profiler.Entries
get

Gets the entries.

The entries.

Definition at line 153 of file Profiler.cs.

string Utilities.Profiler.Manager.Default.Profiler.Function
getprotected set

Function name

Definition at line 158 of file Profiler.cs.

IDictionary<string, Profiler> Utilities.Profiler.Manager.Default.Profiler.InternalChildren
get

Children profiler items

Definition at line 163 of file Profiler.cs.

int Utilities.Profiler.Manager.Default.Profiler.Level
getsetprotected

Level of the profiler

Definition at line 168 of file Profiler.cs.

Profiler Utilities.Profiler.Manager.Default.Profiler.Parent
getsetprotected

Parent profiler item

Definition at line 173 of file Profiler.cs.

Profiler Utilities.Profiler.Manager.Default.Profiler.Root
staticgetprotected set

Contains the root profiler

Definition at line 122 of file Profiler.cs.

bool Utilities.Profiler.Manager.Default.Profiler.Running
getsetprotected

Determines if it is running

Definition at line 178 of file Profiler.cs.

StopWatch Utilities.Profiler.Manager.Default.Profiler.StopWatch
getsetprotected

Stop watch

Definition at line 183 of file Profiler.cs.


The documentation for this class was generated from the following file: