public void BasicTest() { Utilities.Profiler.Profiler TestObject = new Utilities.Profiler.Profiler("Func1"); Thread.Sleep(600); TestObject.Stop(); Assert.InRange(TestObject.TotalTime, 500, 700); }
public void BasicTest() { Utilities.Profiler.Profiler TestObject = new Utilities.Profiler.Profiler("Func1"); Thread.Sleep(600); TestObject.Stop(); Assert.Between(TestObject.TotalTime, 500, 700); }
public void BasicTest() { Utilities.Profiler.Profiler TestObject = new Utilities.Profiler.Profiler("Func1"); Thread.Sleep(600); Utilities.Profiler.Profiler A = new Utilities.Profiler.Profiler("A"); Thread.Sleep(600); A.Stop(); TestObject.Stop(); Assert.InRange(A.Times.Sum(), 500, 700); Assert.InRange(TestObject.Times.Sum(), 1100, 1300); }
protected virtual void CompileData() { bool Continue = true; while (Continue) { Continue = false; for (int x = 0; x < Children.Count; ++x) { IEnumerable<Profiler> Combinables = Children.Where(y => y == Children.ElementAt(x)).ToList(); if (Combinables.Count() > 1) { Continue = true; Profiler Temp = new Profiler(Combinables); Combinables.ForEach(y => Children.Remove(y)); Children.Add(Temp); break; } } } }