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