private static void RunOneFrameOfProfiling(CodeProfiler profiler) { profiler.BeginFrame(); profiler.Start(ProfilingMode.Rendering, Section); profiler.Stop(ProfilingMode.Rendering, Section); profiler.EndFrame(); }
public void ProfilingWhenInactiveDoesNothing() { var profiler = new CodeProfiler { IsActive = false }; profiler.BeginFrame(); profiler.Start(ProfilingMode.Rendering, Section); profiler.Stop(ProfilingMode.Rendering, Section); profiler.EndFrame(); Assert.AreEqual(0, profiler.Sections[(int)ProfilingMode.Rendering].Count); }
private static void RunOneFrameOfProfiling(CodeProfiler profiler) { profiler.BeginFrame(); profiler.Start(ProfilingMode.Rendering, Section); profiler.Stop(ProfilingMode.Rendering, Section); profiler.EndFrame(); }
public void ProfilingWhenInactiveDoesNothing() { var profiler = new CodeProfiler { IsActive = false }; profiler.BeginFrame(); profiler.Start(ProfilingMode.Rendering, Section); profiler.Stop(ProfilingMode.Rendering, Section); profiler.EndFrame(); Assert.AreEqual(0, profiler.Sections[(int)ProfilingMode.Rendering].Count); }