Skip to content

Commit

Permalink
Merge pull request #288 from thomhurst/feature/update-speed-compariso…
Browse files Browse the repository at this point in the history
…n-libs

Update Packages in Speed Comparison
  • Loading branch information
thomhurst authored Aug 7, 2024
2 parents bac2e5b + aaf335b commit 5d9620a
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 37 deletions.
11 changes: 6 additions & 5 deletions TUnit.Analyzers/TUnit.Analyzers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@
</Compile>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\TUnit.Core\TUnit.Core.csproj">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</ProjectReference>
<ItemGroup Condition="'$(Target)' != 'Pack'">
<ProjectReference Include="..\TUnit.Core\TUnit.Core.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
</ItemGroup>

<ItemGroup Condition="'$(Target)' == 'Pack'">
<ProjectReference Include="..\TUnit.Core\TUnit.Core.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(Target)' != 'Pack'">
<ProjectReference Include="..\TUnit.Core\TUnit.Core.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
</ItemGroup>

<ItemGroup Condition="'$(Target)' == 'Pack'">
<ProjectReference Include="..\TUnit.Core\TUnit.Core.csproj" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions TUnit.Engine/TUnit.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<ProjectReference Include="..\TUnit.Core\TUnit.Core.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(GITHUB_ACTIONS)' != 'true'">
<ItemGroup Condition="'$(Target)' != 'Pack'">
<ProjectReference Include="..\TUnit.Engine.SourceGenerator\TUnit.Engine.SourceGenerator.csproj"
OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
</ItemGroup>

<ItemGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ItemGroup Condition="'$(Target)' == 'Pack'">
<ProjectReference Include="..\TUnit.Engine.SourceGenerator\TUnit.Engine.SourceGenerator.csproj" />
<PackageReference Include="Microsoft.Testing.Platform.MSBuild" Version="1.3.2" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions TUnit/TUnit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<ProjectReference Include="..\TUnit.Engine\TUnit.Engine.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(GITHUB_ACTIONS)' != 'true'">
<ItemGroup Condition="'$(Target)' != 'Pack'">
<ProjectReference Include="..\TUnit.Analyzers\TUnit.Analyzers.csproj"
OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
</ItemGroup>

<ItemGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ItemGroup Condition="'$(Target)' == 'Pack'">
<ProjectReference Include="..\TUnit.Analyzers\TUnit.Analyzers.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0"/>
<PackageReference Include="MSTest.TestAdapter" Version="3.0.4"/>
<PackageReference Include="MSTest.TestFramework" Version="3.0.4"/>
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.5.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.5.1" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions tools/speed-comparison/MSTestTimer/MSTestTimer/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ namespace MSTestTimer;
[TestClass]
public class Tests
{
private static Stopwatch _stopwatch;
private static readonly Stopwatch Stopwatch = new();

[ClassInitialize]
public static void Setup(TestContext _)
{
_stopwatch = Stopwatch.StartNew();
Stopwatch.Start();
}

[ClassCleanup]
public static void Cleanup()
{
Console.WriteLine(_stopwatch.Elapsed);
Console.WriteLine(Stopwatch.Elapsed);
}

[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0"/>
<PackageReference Include="NUnit" Version="3.13.3"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1"/>
<PackageReference Include="NUnit.Analyzers" Version="3.6.1"/>
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions tools/speed-comparison/NUnitTimer/NUnitTimer/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ namespace NUnitTimer;
[Parallelizable(ParallelScope.All)]
public class Tests
{
private Stopwatch _stopwatch;
private readonly Stopwatch _stopwatch = new();

[OneTimeSetUp]
public void Setup()
{
_stopwatch = Stopwatch.StartNew();
_stopwatch.Start();
}

[OneTimeTearDown]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="TUnit" Version="0.1.460" />
<PackageReference Include="TUnit" Version="0.1.467" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions tools/speed-comparison/TUnitTimer/TUnitTimer/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ namespace TUnitTimer;

public class Tests
{
private static Stopwatch _stopwatch;
private static readonly Stopwatch Stopwatch = new();

[BeforeAllTestsInClass]
[Before(Class)]
public static void Setup()
{
_stopwatch = Stopwatch.StartNew();
Stopwatch.Start();
}

[AfterAllTestsInClass]
[After(Class)]
public static void Teardown()
{
Console.WriteLine(_stopwatch.Elapsed);
Console.WriteLine(Stopwatch.Elapsed);
}

[Test, Repeat(1_000)]
Expand Down
34 changes: 34 additions & 0 deletions tools/speed-comparison/TestProjects.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xUnitTimer", "xUnitTimer\xUnitTimer\xUnitTimer.csproj", "{D28BD752-BB18-4C2E-85C9-FA965EC55FBA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TUnitTimer", "TUnitTimer\TUnitTimer\TUnitTimer.csproj", "{8653B65B-DE48-49D3-9D88-A36E457F4106}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NUnitTimer", "NUnitTimer\NUnitTimer\NUnitTimer.csproj", "{8D6D3A0C-C844-432E-AABE-184DC9970101}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSTestTimer", "MSTestTimer\MSTestTimer\MSTestTimer.csproj", "{B225ACB3-8E1B-4649-8D51-ADBFCFFA48E8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D28BD752-BB18-4C2E-85C9-FA965EC55FBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D28BD752-BB18-4C2E-85C9-FA965EC55FBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D28BD752-BB18-4C2E-85C9-FA965EC55FBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D28BD752-BB18-4C2E-85C9-FA965EC55FBA}.Release|Any CPU.Build.0 = Release|Any CPU
{8653B65B-DE48-49D3-9D88-A36E457F4106}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8653B65B-DE48-49D3-9D88-A36E457F4106}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8653B65B-DE48-49D3-9D88-A36E457F4106}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8653B65B-DE48-49D3-9D88-A36E457F4106}.Release|Any CPU.Build.0 = Release|Any CPU
{8D6D3A0C-C844-432E-AABE-184DC9970101}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D6D3A0C-C844-432E-AABE-184DC9970101}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D6D3A0C-C844-432E-AABE-184DC9970101}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D6D3A0C-C844-432E-AABE-184DC9970101}.Release|Any CPU.Build.0 = Release|Any CPU
{B225ACB3-8E1B-4649-8D51-ADBFCFFA48E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B225ACB3-8E1B-4649-8D51-ADBFCFFA48E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B225ACB3-8E1B-4649-8D51-ADBFCFFA48E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B225ACB3-8E1B-4649-8D51-ADBFCFFA48E8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
10 changes: 3 additions & 7 deletions tools/speed-comparison/xUnitTimer/xUnitTimer/xUnitTimer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0"/>
<PackageReference Include="xunit" Version="2.4.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 5d9620a

Please sign in to comment.