using System.Diagnostics;
using System.IO;

namespace ImageProcessing_Benchmark
{
    class Program
    {
        static void Main(string[] args)
        {
            string results = "";
            Stopwatch sw = new Stopwatch();
            System.Console.WriteLine("Benchmarking");

            for (int i = 0; i < 100; i++)
            {
                sw.Restart();
                Process.Start("S04_Projet.exe");
                while (Process.GetProcessesByName("S04_Projet").Length != 0);
                sw.Stop();
                results += sw.ElapsedMilliseconds + "\n";
            }

            File.WriteAllText("bench.csv", results);
            System.Console.WriteLine("Done");
            System.Console.Read();
        }
    }
}
