Skip to content

Conversation

@adamsitnik
Copy link
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)

fixes dotnet/runtime#77900
fixes #2079

@adamsitnik
Copy link
Member Author

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
Method Runtime Mean Error StdDev Median Min Max Ratio Gen0 Gen1 Allocated Alloc Ratio
AddChainedConfigurationNoDelimiter .NET 6.0 1,134.3 us 9.98 us 8.85 us 1,133.6 us 1,113.7 us 1,148.5 us 1.00 118.7500 6.2500 1010.97 KB 1.00
AddChainedConfigurationNoDelimiter .NET 7.0 975.2 us 10.67 us 8.91 us 974.1 us 959.3 us 995.5 us 0.86 118.7500 6.2500 1010.97 KB 1.00
AddChainedConfigurationEmpty .NET 6.0 36,984.2 us 213.40 us 189.17 us 36,995.7 us 36,652.1 us 37,313.1 us 1.00 - - 1010.43 KB 1.00
AddChainedConfigurationEmpty .NET 7.0 40,250.9 us 203.40 us 169.85 us 40,188.6 us 40,022.1 us 40,542.8 us 1.09 111.1111 - 1010.2 KB 1.00
AddChainedConfigurationWithSplitting .NET 6.0 429.2 us 3.60 us 2.81 us 430.1 us 423.6 us 432.1 us 1.00 57.2917 5.2083 471.68 KB 1.00
AddChainedConfigurationWithSplitting .NET 7.0 511.2 us 4.75 us 4.44 us 510.0 us 506.2 us 520.1 us 1.19 56.4516 6.0484 471.68 KB 1.00
AddChainedConfigurationWithCommonPaths .NET 6.0 417.4 us 3.84 us 3.59 us 418.1 us 411.7 us 424.6 us 1.00 57.5658 4.9342 471.68 KB 1.00
AddChainedConfigurationWithCommonPaths .NET 7.0 470.3 us 4.09 us 3.41 us 469.2 us 466.3 us 478.8 us 1.13 56.9853 5.5147 471.68 KB 1.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
Method Runtime Mean Error StdDev Median Min Max Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
AddChainedConfigurationNoDelimiter .NET 6.0 894.7 us 15.55 us 14.55 us 896.9 us 865.0 us 917.0 us 1.00 0.00 119.3182 5.6818 1010.97 KB 1.00
AddChainedConfigurationNoDelimiter .NET 7.0 634.1 us 2.14 us 1.78 us 633.9 us 630.5 us 636.8 us 0.71 0.01 17.0455 - 143.22 KB 0.14
AddChainedConfigurationEmpty .NET 6.0 36,917.5 us 134.65 us 112.44 us 36,885.4 us 36,785.7 us 37,166.4 us 1.00 0.00 - - 1010.43 KB 1.00
AddChainedConfigurationEmpty .NET 7.0 28,867.2 us 172.48 us 152.90 us 28,843.3 us 28,663.4 us 29,128.1 us 0.78 0.00 - - 143.26 KB 0.14
AddChainedConfigurationWithSplitting .NET 6.0 455.7 us 11.41 us 13.14 us 457.3 us 435.0 us 482.9 us 1.00 0.00 57.6923 4.8077 471.68 KB 1.00
AddChainedConfigurationWithSplitting .NET 7.0 318.4 us 1.38 us 1.22 us 318.8 us 316.6 us 320.2 us 0.70 0.02 3.7500 - 40.43 KB 0.09
AddChainedConfigurationWithCommonPaths .NET 6.0 470.0 us 7.93 us 7.41 us 472.0 us 456.1 us 480.7 us 1.00 0.00 56.9853 5.5147 471.68 KB 1.00
AddChainedConfigurationWithCommonPaths .NET 7.0 353.1 us 4.01 us 3.55 us 353.1 us 348.0 us 360.7 us 0.75 0.01 4.1667 - 40.43 KB 0.09

@adamsitnik
Copy link
Member Author

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

Copy link
Member

@LoopedBard3 LoopedBard3 left a comment

Choose a reason for hiding this comment

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

LGTM

@adamsitnik
Copy link
Member Author

The CI failures are unrelated, merging.

@adamsitnik adamsitnik merged commit 3fc552c into dotnet:main Nov 8, 2022
@adamsitnik adamsitnik deleted the extensionsUpdate branch November 8, 2022 18:48
Sign up for free to 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