From 6eaf27dac5952ea02e9136e40e2fba7be3774479 Mon Sep 17 00:00:00 2001 From: Michelle McDaniel Date: Mon, 4 Dec 2017 14:01:07 -0800 Subject: Separate large perf benchmarks into their own legs (#15231) Separate large perf benchmarks into their own legs This change splits the windows perf test stages into 6 pipelined legs per flavor to reduce the amount of time we spend running the perf tests and reduce the total time of the job. This change also decreases the size of the stashed bin directory by deleting the obj directory. Finally, we move the benchstones suite into one directory (moving BenchF and BenchI into a shared dir called Benchstones) --- .../CodeQuality/BenchI/8Queens/8Queens.cs | 102 --------------------- 1 file changed, 102 deletions(-) delete mode 100644 tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs (limited to 'tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs') diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs deleted file mode 100644 index d499441822..0000000000 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using Microsoft.Xunit.Performance; -using System; -using System.Runtime.CompilerServices; -using Xunit; - -[assembly: OptimizeForBenchmarks] - -namespace Benchstone.BenchI -{ -public static class EightQueens -{ - -#if DEBUG - public const int Iterations = 1; -#else - public const int Iterations = 100000; -#endif - - static int[] m_c = new int[15]; - static int[] m_x = new int[9]; - - static void TryMe(int i, ref int q, int[] a, int[] b) - { - int j = 0; - q = 0; - while ((q == 0) && (j != 8)) { - j = j + 1; - q = 0; - if ((b[j] == 1) && (a[i + j] == 1) && (m_c[i - j + 7] == 1)) { - m_x[i] = j; - b[j] = 0; - a[i + j] = 0; - m_c[i - j + 7] = 0; - if (i < 8) { - TryMe(i + 1, ref q, a, b); - if (q == 0) { - b[j] = 1; - a[i + j] = 1; - m_c[i - j + 7] = 1; - } - } - else { - q = 1; - } - } - } - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static bool Bench() { - int[] a = new int[9]; - int[] b = new int[17]; - int q = 0; - int i = 0; - while (i <= 16) { - if ((i >= 1) && (i <= 8)) { - a[i] = 1; - } - if (i >= 2) { - b[i] = 1; - } - if (i <= 14) { - m_c[i] = 1; - } - i = i + 1; - } - - TryMe(1, ref q, b, a); - - return (q == 1); - } - - [Benchmark] - public static void Test() { - foreach (var iteration in Benchmark.Iterations) { - using (iteration.StartMeasurement()) { - for (int i = 0; i < Iterations; i++) { - Bench(); - } - } - } - } - - static bool TestBase() { - bool result = true; - for (int i = 0; i < Iterations; i++) { - result &= Bench(); - } - return result; - } - - public static int Main() { - bool result = TestBase(); - return (result ? 100 : -1); - } -} -} -- cgit v1.2.3