Performance issue solved, fully works with Microsoft DI
This commit is contained in:
@@ -8,10 +8,13 @@
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<LangVersion>9</LangVersion>
|
||||
|
||||
<PublishAot>true</PublishAot>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace Example.Backend
|
||||
public static int N;
|
||||
public Task<int> Next(int last)
|
||||
{
|
||||
Console.WriteLine(++N);
|
||||
return Task.FromResult( last + 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Example.Shared\Example.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -30,7 +30,7 @@ await Task.WhenAll(tasks);
|
||||
Console.WriteLine("End waiting");
|
||||
|
||||
var totalRequests = tasks.Sum(i => i.Result);
|
||||
Console.WriteLine($"Total requests: {totalRequests}");
|
||||
Console.WriteLine($"Total requests: {totalRequests:N0}");
|
||||
Console.WriteLine($"Results: {totalRequests / time.TotalSeconds:N} RPS");
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user