示例#1
0
        public void Teardown()
        {
            perfLabs.StopProfilers();

            //This has nothing to do with PeformanceLabs. This is just to delete the sample DB created for profiling
            DeleteDemoDB();
        }
 public static void ProfileMultipleTimes(String operationName, Action operation, Int32 numOfInvocations, Profiler profilingMethod)
 {
     for (Int32 i = 0; i < numOfInvocations; i++)
     {
         perfLabs.StartProfilers();
         using (perfLabs.Step(profilingMethod, operationName))
         {
             operation.Invoke();
         }
         if (profilingMethod == Profiler.MVCMiniProfiler)
         {
             perfLabs.SaveToDataBase();
         }
         perfLabs.StopProfilers();
     }
     perfLabs.StartProfilers();
 }