This project is read-only.

TimingHelper

Example use:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Timing;


namespace TimingHelperExample
{
    class Program
    {
        static void Main(string[] args)
        {
            TimingHelper timer = new TimingHelper();

            timer.TimingStart("Main Loop");
            for (int i = 0; i < 10000; i++)
            {
                timer.TimingStart(i.ToString());
                System.Threading.Thread.Sleep(100);
                timer.TimingEnd();
            }
            timer.TimingEnd();

            Console.WriteLine(timer.ToString());

        }
    }
}


Examples Output:
Root*:  4.842s, # of Children: 1 - average per sub process: 4.842, 100.00 %
        Main Loop:      4.840s, # of Children: 25 - average per sub process: 0.194, 99.96 %
                0:      0.101s, 2.08 %
                1:      0.100s, 2.07 %
                2:      0.101s, 2.09 %
                3:      0.101s, 2.09 %
                4:      0.101s, 2.09 %
                5:      0.101s, 2.09 %
                6:      0.101s, 2.09 %
                7:      0.101s, 2.09 %
                8:      0.100s, 2.07 %
                9:      0.101s, 2.09 %
                10:     0.101s, 2.09 %
                11:     0.101s, 2.09 %
                12:     0.101s, 2.09 %
                13:     0.101s, 2.09 %
                14:     0.101s, 2.09 %
                15:     0.101s, 2.09 %
                16:     0.101s, 2.09 %
                17:     0.101s, 2.09 %
                18:     0.101s, 2.09 %
                19:     0.101s, 2.09 %
                20:     0.101s, 2.09 %
                21:     0.101s, 2.09 %
                22:     0.101s, 2.09 %
                23:     0.101s, 2.09 %
                24:     0.101s, 2.09 %


Last edited Apr 11, 2013 at 11:48 PM by andersonben, version 2

Comments

No comments yet.