-
-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Description
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<PublishAot>true</PublishAot>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TUnit" Version="0.50.0" />
</ItemGroup>
</Project>
class Tests
{
[Test]
[MethodDataSource(nameof(Ints))]
public async Task Test1(int i)
{
await Assert.That(i).IsGreaterThan(0);
}
public static IEnumerable<int> Ints() => Enumerable.Range(1, 10000);
}
Build with dotnet publish --use-current-runtime
and then run the output executable.
In v0.25.21 the test duration was about 190ms, in v0.50.0 it takes about 350ms.
I also get performance differences without AOT, but using it makes it more noticeable.
Metadata
Metadata
Assignees
Labels
No labels