diff options
author | Michelle McDaniel <adiaaida@gmail.com> | 2017-12-04 14:01:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-04 14:01:07 -0800 |
commit | 6eaf27dac5952ea02e9136e40e2fba7be3774479 (patch) | |
tree | cdd0693f6c574140df4510599bdc0b11652524e6 /tests/src/JIT/Performance/CodeQuality/BenchI/Fib | |
parent | ca7448ce6f1916bba5ae3597ca17506272834651 (diff) | |
download | coreclr-6eaf27dac5952ea02e9136e40e2fba7be3774479.tar.gz coreclr-6eaf27dac5952ea02e9136e40e2fba7be3774479.tar.bz2 coreclr-6eaf27dac5952ea02e9136e40e2fba7be3774479.zip |
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)
Diffstat (limited to 'tests/src/JIT/Performance/CodeQuality/BenchI/Fib')
-rw-r--r-- | tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.cs | 65 | ||||
-rw-r--r-- | tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.csproj | 38 |
2 files changed, 0 insertions, 103 deletions
diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.cs deleted file mode 100644 index 3dd897db0f..0000000000 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.cs +++ /dev/null @@ -1,65 +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 Fib -{ - -#if DEBUG - public const int Iterations = 1; -#else - public const int Iterations = 3500; -#endif - - const int Number = 24; - - static int Fibonacci(int x) { - if (x > 2) { - return (Fibonacci(x - 1) + Fibonacci(x - 2)); - } - else { - return 1; - } - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static bool Bench() { - int fib = Fibonacci(Number); - return (fib == 46368); - } - - [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); - } -} -} diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.csproj b/tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.csproj deleted file mode 100644 index 1314ce19a7..0000000000 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/Fib/Fib.csproj +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> - <OutputType>Exe</OutputType> - <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> - <NuGetTargetMoniker>.NETStandard,Version=v1.4</NuGetTargetMoniker> - <NuGetTargetMonikerShort>netstandard1.4</NuGetTargetMonikerShort> - </PropertyGroup> - <!-- Default configurations to help VS understand the configurations --> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " /> - <PropertyGroup> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - </PropertyGroup> - <ItemGroup> - <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> - <Visible>False</Visible> - </CodeAnalysisDependentAssemblyPaths> - </ItemGroup> - <ItemGroup> - <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Fib.cs" /> - </ItemGroup> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> - <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup> - <PropertyGroup> - <ProjectAssetsFile>$(JitPackagesConfigFileDirectory)benchmark\obj\project.assets.json</ProjectAssetsFile> - </PropertyGroup> -</Project> |