Reduce iterations in SqMtx
authorAndy Ayers <andya@microsoft.com>
Tue, 22 Dec 2015 19:20:57 +0000 (11:20 -0800)
committerAndy Ayers <andya@microsoft.com>
Tue, 22 Dec 2015 19:20:57 +0000 (11:20 -0800)
This test had two nested loops using `Iterations` and so ran for quite a long time. Remove the outer nest and then bump up the `Iterations` value so the test runs for about 1 second from command line and 10 seconds under xunit-performance.

tests/src/JIT/Performance/CodeQuality/BenchF/SqMtx/SqMtx.cs

index c1e39cb..e054c73 100644 (file)
@@ -16,7 +16,7 @@ public static class SqMtx
 #if DEBUG
     public const int Iterations = 1;
 #else
-    public const int Iterations = 1000;
+    public const int Iterations = 4000;
 #endif
 
     const int MatrixSize = 40;
@@ -71,18 +71,13 @@ public static class SqMtx
     public static void Test() {
         foreach (var iteration in Benchmark.Iterations) {
             using (iteration.StartMeasurement()) {
-                for (int i = 0; i < Iterations; i++) {
-                   Bench();
-                }
+                Bench();
             }
         }
     }
 
     static bool TestBase() {
-        bool result = true;
-        for (int i = 0; i < Iterations; i++) {
-            result &= Bench();
-        }
+        bool result = Bench();
         return result;
     }