BEPUutilitiesTests.Helper.Test C# (CSharp) Метод

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

public static Test ( string testName, float>.Func function, int benchmarkIterations = 100000000 ) : void
testName string
function float>.Func
benchmarkIterations int
Результат void
        public static void Test(string testName, Func<int, float> function, int benchmarkIterations = 100000000)
        {
            GC.Collect();
            function(10);
            var start = Stopwatch.GetTimestamp();
            var accumulator = function(benchmarkIterations);
            var end = Stopwatch.GetTimestamp();
            Console.WriteLine($"{testName} time: {(end - start) / (double)Stopwatch.Frequency}");
        }

Usage Example

Пример #1
0
        public static void Test()
        {
            const int iterationCount = 10000000;

            //Helper.Test("Cross Scalar Old", TestTransformScalarOld, iterationCount);
            Helper.Test("Cross Scalar", TestTransformScalar, iterationCount);
        }
All Usage Examples Of BEPUutilitiesTests.Helper::Test
Helper