﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tracer;
namespace Tester
{
    class SingleThreadTest : ITest
    {
        private ITracer tracer = new Tracer.Tracer();
        public void Run()
        {
            tracer.StartTrace();

            RunCycle(204800000);

            tracer.StopTrace();

            TraceResult result = tracer.GetTraceResult();
            result.PrintToConsole();
        }

        private void RunCycle(int repeatAmount)
        {
            ITracer tracer = new Tracer.Tracer();
            tracer.StartTrace();

            for (int i = 0; i < repeatAmount; i++)
            {
                int a = 1;
                a += i;
            }

            tracer.StopTrace();

            TraceResult result = tracer.GetTraceResult();
            result.PrintToConsole();
        }

    }
}

﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tracer;
using System.Threading;
namespace Tester
{
    class SingleThreadTest : ITest
    {
        private ITracer tracer = new Tracer.Tracer();
        public void Run()
        {
            tracer.StartTrace();

            Thread.Sleep(500);
            RunCycle(500);

            tracer.StopTrace();

            PrintTestResults();
        }

        private void RunCycle(int sleepTime)
        {
            tracer.StartTrace();

            Thread.Sleep(sleepTime);

            tracer.StopTrace();
        }

        private void PrintTestResults()
        {
            var traceResult = tracer.GetTraceResult();
            foreach (TraceResultItem analyzedItem in traceResult)
            {
                analyzedItem.PrintToConsole();
            }
        }

    }
}

Update Tester class implementation due to the recent changes in Tester implementation
Update Tester class implementation due to the recent changes in Tester implementation
