diff options
author | Ian Hays <ianha@microsoft.com> | 2015-09-18 03:55:54 +0300 |
---|---|---|
committer | Ian Hays <ianha@microsoft.com> | 2015-09-24 20:01:40 +0300 |
commit | 11ea534258ced35948e53a4ece8fb1284698bf8a (patch) | |
tree | fb01cbb2ec05b51b4ec860f5ae95ec9050050ce7 /src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj | |
parent | 0c2c555bf485835c2ccd675e19d030c6a90683ed (diff) |
Added performance microbenchmarks
- Added "Performance" folders containing perf xunit tests to a number of highly-used libraries (determined by Usage data)
- Two sets of usage data from store apps; I added a test for every function used in more than 5% of the covered assemblies in both data sets.
- This is a first-round pass of the most highly used libraries and does not include: abstract classes, interfaces, or Attributes
- Created a static utility class for commonly used functions across perf tests, stored in src\Common\tests\Performance.
- These tests will run using ```msbuild /t:BuildAndTest /p:performance=true``` from the projects test directory
- Added conditional properties that check if v5.0 is installed on the user's computer when running perf tests. If it isn't, a detailed error is thrown with a link to a performance-test github page that I've also added.
Diffstat (limited to 'src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj')
-rw-r--r-- | src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj b/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj index 49aec22928..9d4514cc27 100644 --- a/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj +++ b/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj @@ -9,6 +9,11 @@ <AssemblyName>System.IO.FileSystem.Tests</AssemblyName> <TestCategories>InnerLoop;OuterLoop</TestCategories> </PropertyGroup> + <!-- Performance tests require v5.0 portable tools --> + <PropertyGroup Condition="'$(RunPerfTestsForProject)' == 'true'"> + <TargetFrameworkVersion>v5.0</TargetFrameworkVersion> + <TargetFrameworkProfile /> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> <DebugSymbols>true</DebugSymbols> <PlatformTarget>AnyCPU</PlatformTarget> @@ -28,7 +33,6 @@ <Name>System.IO.FileSystem</Name> <Private>True</Private> </ProjectReference> - <!-- Until an updated packages is published, temporarily copy the locally built System.Runtime.Extensions library but still reference the contract from the package for compiling. @@ -165,5 +169,14 @@ <Link>Common\System\IO\FileCleanupTestBase.cs</Link> </Compile> </ItemGroup> + <!-- Performance Tests --> + <ItemGroup Condition="'$(RunPerfTestsForProject)' == 'true'"> + <Compile Include="Performance\Perf.Directory.cs" /> + <Compile Include="Performance\Perf.File.cs" /> + <Compile Include="Performance\Perf.FileInfo.cs" /> + <Compile Include="$(CommonTestPath)\Performance\PerfUtils.cs"> + <Link>Common\Performance\PerfUtils.cs</Link> + </Compile> + </ItemGroup> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> -</Project> +</Project>
\ No newline at end of file |