-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
4,997 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using coverlet.testsubject; | ||
using Xunit; | ||
|
||
namespace coverlet.core.performancetest | ||
{ | ||
/// <summary> | ||
/// Test the performance of coverlet by running a unit test that calls a reasonably big and complex test class. | ||
/// Enable the test, compile, then run the test in the command line: | ||
/// <code> | ||
/// dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=opencover test/coverlet.core.performa ncetest/ | ||
/// </code> | ||
/// </summary> | ||
public class PerformanceTest | ||
{ | ||
[Theory(Skip = "Only enabled when explicitly testing performance.")] | ||
[InlineData(150)] | ||
public void TestPerformance(int iterations) | ||
{ | ||
var big = new BigClass(); | ||
|
||
for (var i = 0; i < iterations; i++) | ||
{ | ||
big.Do(i); | ||
} | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
test/coverlet.core.performancetest/coverlet.core.performancetest.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="$(MSBuildThisFileDirectory)\..\..\build\$(Configuration)\coverlet.msbuild.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.0</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="xunit" Version="2.3.1" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\coverlet.testsubject\coverlet.testsubject.csproj" /> | ||
</ItemGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)\..\..\build\$(Configuration)\coverlet.msbuild.targets" /> | ||
</Project> |
Oops, something went wrong.