PerformanceTest.Benchmark.PrepareSystemForBenchmark C# (CSharp) Метод

PrepareSystemForBenchmark() публичный статический Метод

Prepares the system for benchmark will force Garbage Collection to run with maximum generation and wait it to finish.
public static PrepareSystemForBenchmark ( ) : void
Результат void
        public static void PrepareSystemForBenchmark ()
        {
            GC.Collect (GC.MaxGeneration, GCCollectionMode.Forced);
            GC.WaitForPendingFinalizers ();
            GC.Collect ();
            System.Threading.Thread.Sleep (0);
        }