public void FirstMethod(impl.Tracer tracer) { tracer.StartTrace(); Thread.Sleep(100); SecondMethod(tracer); tracer.StopTrace(); }
private static void Do1(Object tracer) { impl.Tracer tracerTest = (impl.Tracer)tracer; tracerTest.StartTrace(); Thread.Sleep(100); tracerTest.StopTrace(); }
public void Main() { var tracer = new impl.Tracer(); tracer.StartTrace(); FirstMethod(tracer); Thread.Sleep(100); tracer.StopTrace(); Main2(tracer); List <ThreadTracer> tracerResult = tracer.GetResult().GetThreadTracers(); tracer.GetResult().OutPut(new ConsoleOutPut(), new JsonSerializeImpl()); Assert.AreEqual("FirstMethod", tracerResult[0].Methods[1].Methods[0].Name); }
public void main() { impl.Tracer tracer = new impl.Tracer(); tracer.StartTrace(); Thread.Sleep(10); tracer.StopTrace(); Thread thread = new Thread(new ParameterizedThreadStart(Do1)); thread.Start(tracer); thread.Join(); List <ThreadTracer> TracerResult = tracer.GetResult().GetThreadTracers(); tracer.GetResult().OutPut(new ConsoleOutPut(), new JsonSerializeImpl()); Assert.AreEqual(2, TracerResult.Count); }
public void SecondMethod(impl.Tracer tracer) { tracer.StartTrace(); Thread.Sleep(120); tracer.StopTrace(); }
public void Main2(impl.Tracer tracer) { tracer.StartTrace(); Thread.Sleep(10); tracer.StopTrace(); }