Skip to content

[Microbenchmarks] TFMs cleanup + Microsoft.Extensions* update - #2703

Merged
adamsitnik merged 4 commits into
dotnet:mainfrom
adamsitnik:extensionsUpdate
Nov 8, 2022
Merged

[Microbenchmarks] TFMs cleanup + Microsoft.Extensions* update#2703
adamsitnik merged 4 commits into
dotnet:mainfrom
adamsitnik:extensionsUpdate

Conversation

@adamsitnik

Copy link
Copy Markdown
Member

I've investigated dotnet/runtime#77900 (comment) and the reason behind the "regression" was not using the appropriate version of Microsoft.Extensions*. These particular libraries and not shipped as part of .NET SDK (they are often called OOB: "out-of-band") and they require manual version update in the .csproj. Since 7.0 versions of all Microsoft.Extensions* packages were shipped to nuget.org yesterday, it was a perfect moment to update them and the System* libraries.

But the System* libraries don't support net461 anymore:

System.Security.Cryptography.Pkcs 7.0.0 doesn't support net461 and has not been
tested with it. Consider upgrading your TargetFramework to net462 or later. 

So I've upgraded net461 to net462.

Then the other warning I was getting was:

The target framework 'net5.0' is out of support and will not receive security updates in the future.

So I've removed the net5.0 tfm. And last but not least, I've limited the test projects to target single tfm (net7.0)

fixesdotnet/runtime#77900
fixes#2079

@adamsitnik

Copy link
Copy Markdown
MemberAuthor

Before:

BenchmarkDotNet=v0.13.2.1940-nightly, OS=Windows 11 (10.0.22621.674)
AMD Ryzen Threadripper PRO 3945WX 12-Cores, 1 CPU, 24 logical and 12 physical cores
.NET SDK=7.0.100-rc.1.22431.12
[Host] : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2
Job-EOWPLY : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2
Job-RERDVV : .NET 7.0.0 (7.0.22.42610), X64 RyuJIT AVX2
MethodRuntimeMeanErrorStdDevMedianMinMaxRatioGen0Gen1AllocatedAlloc Ratio
AddChainedConfigurationNoDelimiter.NET 6.01,134.3 us9.98 us8.85 us1,133.6 us1,113.7 us1,148.5 us1.00118.75006.25001010.97 KB1.00
AddChainedConfigurationNoDelimiter.NET 7.0975.2 us10.67 us8.91 us974.1 us959.3 us995.5 us0.86118.75006.25001010.97 KB1.00
AddChainedConfigurationEmpty.NET 6.036,984.2 us213.40 us189.17 us36,995.7 us36,652.1 us37,313.1 us1.00--1010.43 KB1.00
AddChainedConfigurationEmpty.NET 7.040,250.9 us203.40 us169.85 us40,188.6 us40,022.1 us40,542.8 us1.09111.1111-1010.2 KB1.00
AddChainedConfigurationWithSplitting.NET 6.0429.2 us3.60 us2.81 us430.1 us423.6 us432.1 us1.0057.29175.2083471.68 KB1.00
AddChainedConfigurationWithSplitting.NET 7.0511.2 us4.75 us4.44 us510.0 us506.2 us520.1 us1.1956.45166.0484471.68 KB1.00
AddChainedConfigurationWithCommonPaths.NET 6.0417.4 us3.84 us3.59 us418.1 us411.7 us424.6 us1.0057.56584.9342471.68 KB1.00
AddChainedConfigurationWithCommonPaths.NET 7.0470.3 us4.09 us3.41 us469.2 us466.3 us478.8 us1.1356.98535.5147471.68 KB1.00

After:

BenchmarkDotNet=v0.13.2.1950-nightly, OS=Windows 11 (10.0.22621.674)
AMD Ryzen Threadripper PRO 3945WX 12-Cores, 1 CPU, 24 logical and 12 physical cores
.NET SDK=8.0.100-alpha.1.22558.1
[Host] : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2
Job-REUZGI : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2
Job-XTHPSX : .NET 7.0.0 (7.0.22.42610), X64 RyuJIT AVX2
MethodRuntimeMeanErrorStdDevMedianMinMaxRatioRatioSDGen0Gen1AllocatedAlloc Ratio
AddChainedConfigurationNoDelimiter.NET 6.0894.7 us15.55 us14.55 us896.9 us865.0 us917.0 us1.000.00119.31825.68181010.97 KB1.00
AddChainedConfigurationNoDelimiter.NET 7.0634.1 us2.14 us1.78 us633.9 us630.5 us636.8 us0.710.0117.0455-143.22 KB0.14
AddChainedConfigurationEmpty.NET 6.036,917.5 us134.65 us112.44 us36,885.4 us36,785.7 us37,166.4 us1.000.00--1010.43 KB1.00
AddChainedConfigurationEmpty.NET 7.028,867.2 us172.48 us152.90 us28,843.3 us28,663.4 us29,128.1 us0.780.00--143.26 KB0.14
AddChainedConfigurationWithSplitting.NET 6.0455.7 us11.41 us13.14 us457.3 us435.0 us482.9 us1.000.0057.69234.8077471.68 KB1.00
AddChainedConfigurationWithSplitting.NET 7.0318.4 us1.38 us1.22 us318.8 us316.6 us320.2 us0.700.023.7500-40.43 KB0.09
AddChainedConfigurationWithCommonPaths.NET 6.0470.0 us7.93 us7.41 us472.0 us456.1 us480.7 us1.000.0056.98535.5147471.68 KB1.00
AddChainedConfigurationWithCommonPaths.NET 7.0353.1 us4.01 us3.55 us353.1 us348.0 us360.7 us0.750.014.1667-40.43 KB0.09

@adamsitnik

Copy link
Copy Markdown
MemberAuthor

It's now possible to build entire solution with no warnings:

PS D:\projects\performance\src\benchmarks\micro> dotnet build -c Release
MSBuild version 17.5.0-preview-22555-01+3bcada934 for .NET
Determining projects to restore...
Restored D:\projects\performance\src\harness\BenchmarkDotNet.Extensions\BenchmarkDotNet.Extensions.csproj (in 335 ms).
Restored D:\projects\performance\src\tools\Reporting\Reporting\Reporting.csproj (in 335 ms).
Restored D:\projects\performance\src\tests\harness\BenchmarkDotNet.Extensions.Tests\BenchmarkDotNet.Extensions.Tests.csproj (in 566 ms).
Restored D:\projects\performance\src\benchmarks\micro\MicroBenchmarks.csproj (in 648 ms).
Reporting -> D:\projects\performance\artifacts\bin\Reporting\Release\netstandard2.0\Reporting.dll
BenchmarkDotNet.Extensions -> D:\projects\performance\artifacts\bin\BenchmarkDotNet.Extensions\Release\netstandard2.0\BenchmarkDotNet.Extensions.dll
MicroBenchmarks -> D:\projects\performance\artifacts\bin\MicroBenchmarks\Release\netcoreapp3.1\MicroBenchmarks.dll
MicroBenchmarks -> D:\projects\performance\artifacts\bin\MicroBenchmarks\Release\net462\MicroBenchmarks.exe
MicroBenchmarks -> D:\projects\performance\artifacts\bin\MicroBenchmarks\Release\net6.0\MicroBenchmarks.dll
MicroBenchmarks -> D:\projects\performance\artifacts\bin\MicroBenchmarks\Release\net7.0\MicroBenchmarks.dll
MicroBenchmarks -> D:\projects\performance\artifacts\bin\MicroBenchmarks\Release\net8.0\MicroBenchmarks.dll
BenchmarkDotNet.Extensions.Tests -> D:\projects\performance\artifacts\bin\BenchmarkDotNet.Extensions.Tests\Release\net7.0\BenchmarkDotNet.Extensions.Tests.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:15.03

@LoopedBard3LoopedBard3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adamsitnik

Copy link
Copy Markdown
MemberAuthor

The CI failures are unrelated, merging.

@adamsitnik
adamsitnik merged commit 3fc552c into dotnet:mainNov 8, 2022
@adamsitnik
adamsitnik deleted the extensionsUpdate branch November 8, 2022 18:48
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Perf] Linux/x64: 16 Regressions on 9/22/2022 3:16:12 AM Update the package reference versions in Microbenchmark.csproj

2 participants

@adamsitnik@LoopedBard3