Example #1
0
 public void FirstMethod(impl.Tracer tracer)
 {
     tracer.StartTrace();
     Thread.Sleep(100);
     SecondMethod(tracer);
     tracer.StopTrace();
 }
Example #2
0
 private static void Do1(Object tracer)
 {
     impl.Tracer tracerTest = (impl.Tracer)tracer;
     tracerTest.StartTrace();
     Thread.Sleep(100);
     tracerTest.StopTrace();
 }
Example #3
0
        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);
        }
Example #4
0
        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);
        }
Example #5
0
 public void SecondMethod(impl.Tracer tracer)
 {
     tracer.StartTrace();
     Thread.Sleep(120);
     tracer.StopTrace();
 }
Example #6
0
 public void Main2(impl.Tracer tracer)
 {
     tracer.StartTrace();
     Thread.Sleep(10);
     tracer.StopTrace();
 }