Allows classes and methods to be profiled as to how long they took to run.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Profiling CodeProfiler
Namespace: DeltaEngine.Profiling
Assembly: DeltaEngine.Profiling (in DeltaEngine.Profiling.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The CodeProfiler type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CodeProfiler | Initializes a new instance of the CodeProfiler class |
Methods
Name | Description | |
---|---|---|
BeginFrame | ||
EndFrame | ||
GetProfilingResults | ||
GetProfilingResultsSummary | ||
Start | ||
Stop |
Properties
Name | Description | |
---|---|---|
Current | ||
IsActive | ||
MaximumPollsPerSecond | ||
ResetInterval |
Events
Name | Description | |
---|---|---|
Updated |
Remarks
Examples
[Test] public void VerifyStaticProfilerCurrentIsFalse() { var profiler = CodeProfiler.Current as CodeProfiler; Assert.IsFalse(profiler.IsActive); }
[Test] public void VerifyStaticProfilerDefaultProperties() { var profiler = CodeProfiler.Current as CodeProfiler; Assert.AreEqual(10, profiler.MaximumPollsPerSecond); Assert.AreEqual(0, profiler.ResetInterval); Assert.IsFalse(profiler.IsActive); }
[Test] public void ChangeMaximumPollsPerSecond() { var profiler = new CodeProfiler(5); Assert.AreEqual(5, profiler.MaximumPollsPerSecond); profiler.MaximumPollsPerSecond = 2; Assert.AreEqual(2, profiler.MaximumPollsPerSecond); }
See Also