public static void ProfileMultipleTimes(String profileName, Action operation, Int32 numOfInvocations, Profiler profilingOperation)
 {
     for (Int32 i = 0; i < numOfInvocations; i++)
     {
         perfLabs.StartProfilers();
         using (perfLabs.Step(profilingOperation, profileName))
         {
             operation.Invoke();
         }
         perfLabs.StopProfilers();
     }
     perfLabs.StartProfilers();
 }
        public void SetUp()
        {
            ///DO NOT DELETE THIS COMMENTED CODE
            //string nunitConfig = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
            //string appConfig = Path.GetFileName(Assembly.GetExecutingAssembly().Location) + ".config";
            //File.Copy(appConfig, nunitConfig, true);

            context = new TestDBBlogContext();
            context.Database.CreateIfNotExists();

            contextTestDBPLabs = new Test_PerformanceLabsDBContext();
            contextTestDBPLabs.Database.CreateIfNotExists();

            perfLabs = new PerformanceLabsFramework.PerformanceLabs();
            MakeProfilerSettings();
            perfLabs.StartProfilers();
        }
 public void Setup()
 {
     perfLabs.StartProfilers();
 }