Skip to content

Commit 3fc552c

Browse files
authored
[Microbenchmarks] TFMs cleanup + Microsoft.Extensions* update (#2703)
* use 7.0.0 Microsoft.Extensions* when targeting net7.0, so .NET 6 vs 7 diff shows the actual difference for Extensions benchmarks, fixes dotnet/runtime#77900 * update net461 to net462 as the 7.0.0 version of System* libraries like System.Threading.Channels do not support net461 anymore * remove net5.0 (it's not supported anymore) * the test projects don't need to target old monikers, net7.0 is enough
1 parent 3588c77 commit 3fc552c

File tree

9 files changed

+19
-20
lines changed

9 files changed

+19
-20
lines changed

azure-pipelines.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,12 @@ jobs:
195195
channels:
196196
- main
197197

198-
# Windows x64 net461 micro benchmarks
198+
# Windows x64 net462 micro benchmarks
199199
- template: /eng/performance/benchmark_jobs.yml
200200
parameters:
201201
osName: windows
202202
osVersion: RS5
203-
kind: micro_net461
203+
kind: micro_net462
204204
architecture: x64
205205
pool:
206206
vmImage: windows-2019
@@ -209,7 +209,7 @@ jobs:
209209
csproj: src\benchmarks\micro\MicroBenchmarks.csproj
210210
runCategories: 'runtime libraries'
211211
channels: # for public jobs we want to make sure that the PRs don't break any of the supported frameworks
212-
- LTS # use LTS channel for net461 framework
212+
- LTS # use LTS channel for net462 framework
213213

214214
# Windows x86 micro benchmarks
215215
- template: /eng/performance/benchmark_jobs.yml

docs/benchmarkdotnet.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ M00_L00:
285285

286286
The `--runtimes` or just `-r` allows you to run the benchmarks for **multiple Runtimes**.
287287

288-
Available options are: Mono, wasmnet70, CoreRT, net461, net462, net47, net471, net472, netcoreapp3.1, net6.0 and net7.0.
288+
Available options are: Mono, wasmnet70, CoreRT, net462, net47, net471, net472, netcoreapp3.1, net6.0 and net7.0.
289289

290290
Example: run the benchmarks for .NET 6.0 and 7.0:
291291

eng/performance/helix.proj

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<WorkItemCommand>$(Python) $(WorkItemCommand) --incremental no --architecture $(Architecture) -f $(PERFLAB_Framework) $(_PerfLabArguments)</WorkItemCommand>
1313
</PropertyGroup>
1414

15-
<PropertyGroup Condition="'$(PERFLAB_Framework)' != 'net461'">
15+
<PropertyGroup Condition="'$(PERFLAB_Framework)' != 'net462'">
1616
<WorkItemCommand>$(WorkItemCommand) $(CliArguments)</WorkItemCommand>
1717
</PropertyGroup>
1818

scripts/channel_map.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ChannelMap():
8484
'quality': 'daily'
8585
},
8686
'LTS': {
87-
'tfm': 'net461', # For Full Framework download the LTS for dotnet cli.
87+
'tfm': 'net462', # For Full Framework download the LTS for dotnet cli.
8888
'branch': 'LTS'
8989
},
9090
'net48': {

scripts/micro_benchmarks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def __get_benchmarkdotnet_arguments(framework: str, args: tuple) -> list:
262262
if framework.startswith("nativeaot"):
263263
run_args += ['--runtimes', framework]
264264
if args.wasm:
265-
if framework == "net5.0" or framework == "net6.0":
265+
if framework == "net6.0":
266266
run_args += ['--runtimes', 'wasm']
267267
else:
268268
run_args += ['--runtimes', 'wasmnet70']

src/benchmarks/micro/MicroBenchmarks.csproj

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<!-- Used by Python script to narrow down the specified target frameworks to test, and avoid downloading all supported SDKs -->
55
<TargetFrameworks>$(PERFLAB_TARGET_FRAMEWORKS)</TargetFrameworks>
66
<!-- Supported target frameworks -->
7-
<TargetFrameworks Condition="'$(TargetFrameworks)' == '' AND '$(OS)' == 'Windows_NT'">net461;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
8-
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
7+
<TargetFrameworks Condition="'$(TargetFrameworks)' == '' AND '$(OS)' == 'Windows_NT'">net462;netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
8+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
99
<NoWarn>$(NoWarn);CS8002</NoWarn>
1010
<!-- Suppress binaryformatter obsolete warning -->
1111
<NoWarn>$(NoWarn);SYSLIB0011</NoWarn>
@@ -29,17 +29,17 @@
2929
<SystemVersion>4.7.1</SystemVersion>
3030
</PropertyGroup>
3131
</When>
32-
<When Condition="'$(TargetFramework)' == 'net5.0'">
32+
<When Condition="'$(TargetFramework)' == 'net6.0'">
3333
<PropertyGroup>
34-
<ExtensionsVersion>5.0.0</ExtensionsVersion>
35-
<SystemVersion>5.0.0</SystemVersion>
34+
<ExtensionsVersion>6.0.0</ExtensionsVersion>
35+
<SystemVersion>6.0.0</SystemVersion>
3636
</PropertyGroup>
3737
</When>
3838
<Otherwise>
39-
<!-- when comparing against Full .NET Framework we are usually interested in CLR differences, so net461 belongs to this block -->
39+
<!-- when comparing against Full .NET Framework we are usually interested in CLR differences, so net462 belongs to this block -->
4040
<PropertyGroup>
41-
<ExtensionsVersion>6.0.0</ExtensionsVersion>
42-
<SystemVersion>6.0.0</SystemVersion>
41+
<ExtensionsVersion>7.0.0</ExtensionsVersion>
42+
<SystemVersion>7.0.0</SystemVersion>
4343
</PropertyGroup>
4444
</Otherwise>
4545
</Choose>
@@ -62,7 +62,7 @@
6262
<PackageReference Include="System.Drawing.Common" Version="$(SystemVersion)" />
6363
<PackageReference Include="System.Formats.Cbor" Version="$(SystemVersion)" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' >= '5.0'" />
6464
<PackageReference Include="System.IO.Pipelines" Version="$(SystemVersion)" />
65-
<PackageReference Include="System.Memory" Version="4.5.4" />
65+
<PackageReference Include="System.Memory" Version="4.5.5" />
6666
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
6767
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="4.3.0" />
6868
<PackageReference Include="System.Runtime.Serialization.Json" Version="4.3.0" />

src/benchmarks/micro/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To learn more about designing benchmarks, please read [Microbenchmark Design Gui
1212

1313
## Quick Start
1414

15-
The first thing that you need to choose is the Target Framework. Available options are: `netcoreapp3.1|net6.0|net7.0|net461`. You can specify the target framework using `-f|--framework` argument. For the sake of simplicity, all examples below use `net7.0` as the target framework.
15+
The first thing that you need to choose is the Target Framework. Available options are: `netcoreapp3.1|net6.0|net7.0|net462`. You can specify the target framework using `-f|--framework` argument. For the sake of simplicity, all examples below use `net7.0` as the target framework.
1616

1717
The following commands are run from the `src/benchmarks/micro` directory.
1818

src/tests/harness/BenchmarkDotNet.Extensions.Tests/BenchmarkDotNet.Extensions.Tests.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<!-- Used by Python script to narrow down the specified target frameworks to test, and avoid downloading all supported SDKs -->
55
<TargetFrameworks>$(PERFLAB_TARGET_FRAMEWORKS)</TargetFrameworks>
66
<!-- Supported target frameworks -->
7-
<TargetFrameworks Condition="'$(TargetFrameworks)' == '' AND '$(OS)' == 'Windows_NT'">net461;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
8-
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
7+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net7.0</TargetFrameworks>
98
<IsPackable>false</IsPackable>
109
</PropertyGroup>
1110

src/tools/Reporting/Reporting.Tests/Reporting.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
4+
<TargetFrameworks>net7.0</TargetFrameworks>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

0 commit comments

Comments
 (0)