CodeProfilerTests StartingCreatesASection Method Delta Engine Documentation

Namespace: DeltaEngine.Profiling.Tests
Assembly: DeltaEngine.Profiling.Tests (in DeltaEngine.Profiling.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void StartingCreatesASection()
Examples

[Test]
public void StartingCreatesASection()
{
    var profiler = new CodeProfiler();
    profiler.Start(ProfilingMode.Rendering, Section);
    const int SectionNumber = 2;
    CodeProfilerSection section = profiler.Sections[SectionNumber][0];
    Assert.AreEqual(Section, section.Name);
    Assert.AreEqual(0, section.Calls);
    Assert.AreEqual(0.0f, section.TotalTime);
    Assert.AreEqual(1, profiler.SectionMaps[SectionNumber].Count);
    Assert.AreEqual(1, profiler.Sections[SectionNumber].Count);
}
See Also