Skip to content

Commit ca80d8e

Browse files
authored
Remove 2.2 (dotnet#1136)
* remove 2.2 CI legs * restore 3.0 and 2.1 CI legs * supported TFMs: remove 2.2, add 3.1 and update the docs * remove compilation conditions for NETCOREAPP2_2 from the source code * update python scripts
1 parent 04f780c commit ca80d8e

File tree

15 files changed

+33
-37
lines changed

15 files changed

+33
-37
lines changed

Diff for: azure-pipelines.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ jobs:
9292
channels:
9393
- master
9494
- release/3.1.2xx
95+
- 3.0
96+
- 2.1
9597

9698
# Windows x64 net461 micro benchmarks
9799
- template: /eng/performance/benchmark_jobs.yml
@@ -167,7 +169,6 @@ jobs:
167169
- master
168170
- release/3.1.2xx
169171
- 3.0
170-
- 2.2
171172
- 2.1
172173

173174
# Ubuntu 1804 x64 ML.NET benchmarks

Diff for: docs/benchmarkdotnet.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ In order to build or run the benchmarks you will need the **.NET Core command-li
5959

6060
### Using .NET Cli
6161

62-
To build the benchmarks you need to have the right `dotnet cli`. This repository allows to benchmark .NET Core 2.0, 2.1, 2.2, 3.0 and 5.0 so you need to install all of them.
62+
To build the benchmarks you need to have the right `dotnet cli`. This repository allows to benchmark .NET Core 2.1, 3.0, 3.1 and 5.0 so you need to install all of them.
6363

6464
All you need to do is run the following command:
6565

@@ -70,8 +70,8 @@ dotnet build -c Release
7070
If you don't want to install all of them and just run the benchmarks for selected runtime(s), you need to manually edit the [common.props](../build/common.props) file.
7171

7272
```diff
73-
-<TargetFrameworks>netcoreapp2.1;netcoreapp2.2;netcoreapp3.0</TargetFrameworks>
74-
+<TargetFrameworks>netcoreapp3.0</TargetFrameworks>
73+
-<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;netcoreapp5.0</TargetFrameworks>
74+
+<TargetFrameworks>netcoreapp5.0</TargetFrameworks>
7575
```
7676

7777
### Using Python script
@@ -283,30 +283,30 @@ M00_L00:
283283

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

286-
Available options are: Mono, CoreRT, net461, net462, net47, net471, net472, netcoreapp2.1, netcoreapp2.2, netcoreapp3.0.
286+
Available options are: Mono, CoreRT, net461, net462, net47, net471, net472, netcoreapp2.1, netcoreapp3.0, netcoreapp3.1 and netcoreapp5.0.
287287

288-
Example: run the benchmarks for .NET Core 2.2 and 3.0:
288+
Example: run the benchmarks for .NET Core 3.1 and 5.0:
289289

290290
```cmd
291-
dotnet run -c Release -f netcoreapp2.2 --runtimes netcoreapp2.1 netcoreapp3.0
291+
dotnet run -c Release -f netcoreapp3.1 --runtimes netcoreapp3.1 netcoreapp5.0
292292
```
293293

294-
**Important: The host process needs to be the lowest common API denominator of the runtimes you want to compare!** In this case, it was`netcoreapp2.2`.
294+
**Important: The host process needs to be the lowest common API denominator of the runtimes you want to compare!** In this case, it was`netcoreapp3.1`.
295295

296296
## Regressions
297297

298298
To perform a Mann–Whitney U Test and display the results in a dedicated column you need to provide the Threshold for Statistical Test via `--statisticalTest` argument. The value can be relative (5%) or absolute (10ms, 100ns, 1s)
299299

300-
Example: run Mann–Whitney U test with relative ratio of 5% for `BinaryTrees_2` for .NET Core 2.1 (base) vs .NET Core 2.2 (diff). .NET Core 2.1 will be baseline because it was first.
300+
Example: run Mann–Whitney U test with relative ratio of 5% for `BinaryTrees_2` for .NET Core 3.1 (base) vs .NET Core 5.0 (diff). .NET Core 3.1 will be baseline because it was first.
301301

302302
```cmd
303-
dotnet run -c Release -f netcoreapp2.1 --filter *BinaryTrees_2* --runtimes netcoreapp2.1 netcoreapp2.2 --statisticalTest 5%
303+
dotnet run -c Release -f netcoreapp3.1 --filter *BinaryTrees_2* --runtimes netcoreapp3.1 netcoreapp5.0 --statisticalTest 5%
304304
```
305305

306306
| Method | Toolchain | Mean | MannWhitney(5%) |
307307
|-------------- |-------------- |---------:|---------------- |
308-
| BinaryTrees_2 | netcoreapp2.1 | 124.4 ms | Base |
309-
| BinaryTrees_2 | netcoreapp2.2 | 153.7 ms | Slower |
308+
| BinaryTrees_2 | netcoreapp3.1 | 124.4 ms | Base |
309+
| BinaryTrees_2 | netcoreapp5.0 | 153.7 ms | Slower |
310310

311311
**Note:** to compare the historical results you need to use [Results Comparer](../src/tools/ResultsComparer/README.md)
312312

Diff for: docs/benchmarking-workflow-dotnet-runtime.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ If profiling using the `--profiler ETW` is not enough, you should use a differen
212212

213213
BenchmarkDotNet has some extra features that might be useful when doing performance investigation:
214214

215-
- You can run the benchmarks against [multiple Runtimes](./benchmarkdotnet.md#Multiple-Runtimes). It can be very useful when the regression has been introduced between .NET Core releases, for example: between netcoreapp2.2 and netcoreapp3.0.
215+
- You can run the benchmarks against [multiple Runtimes](./benchmarkdotnet.md#Multiple-Runtimes). It can be very useful when the regression has been introduced between .NET Core releases, for example: between netcoreapp3.1 and netcoreapp5.0.
216216
- You can run the benchmarks using provided [dotnet cli](./benchmarkdotnet.md#dotnet-cli). You can download few dotnet SDKs, unzip them and just run the benchmarks to spot the version that has introduced the regression to narrow down your investigation.
217217
- You can run the benchmarks using few [CoreRuns](./benchmarkdotnet.md#CoreRun). You can build the latest [dotnet/runtime](https://github.com/dotnet/runtime) in Release, create a copy of the folder with CoreRun and use git to checkout an older commit. Then rebuild [dotnet/runtime](https://github.com/dotnet/runtime) and run the benchmarks against the old and new builds. This can narrow down your investigation to the commit that has introduced the bug.
218218

Diff for: scripts/benchmarks_ci.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def __main(args: list) -> int:
209209
)
210210

211211
# WORKAROUND
212-
# The MicroBenchmarks.csproj targets .NET Core 2.0, 2.1, 2.2 and 3.0
212+
# The MicroBenchmarks.csproj targets .NET Core 2.1, 3.0, 3.1 and 5.0
213213
# to avoid a build failure when using older frameworks (error NETSDK1045:
214214
# The current .NET SDK does not support targeting .NET Core $XYZ)
215215
# we set the TFM to what the user has provided.

Diff for: scripts/channel_map.py

-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ class ChannelMap():
2222
'tfm': 'netcoreapp3.0',
2323
'branch': 'release/3.0'
2424
},
25-
'2.2': {
26-
'tfm': 'netcoreapp2.2',
27-
'branch': 'release/2.2'
28-
},
2925
'release/2.1.6xx': {
3026
'tfm': 'netcoreapp2.1',
3127
'branch': 'release/2.1.6xx'

Diff for: scripts/dotnet.py

-1
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,6 @@ def __process_arguments(args: list):
813813
# TODO: Could pull this information from repository.
814814
SUPPORTED_CHANNELS = [
815815
'master', # Default channel
816-
'2.2',
817816
'2.1',
818817
'LTS',
819818
]

Diff for: src/benchmarks/micro/MicroBenchmarks.csproj

+2-2
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;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp5.0</TargetFrameworks>
8-
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp5.0</TargetFrameworks>
7+
<TargetFrameworks Condition="'$(TargetFrameworks)' == '' AND '$(OS)' == 'Windows_NT'">net461;netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;netcoreapp5.0</TargetFrameworks>
8+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;netcoreapp5.0</TargetFrameworks>
99

1010
<OutputType>Exe</OutputType>
1111
<PlatformTarget>AnyCPU</PlatformTarget>

Diff for: src/benchmarks/micro/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,38 @@ 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: `netcoreapp2.1|netcoreapp2.2|netcoreapp3.0|net461`. You can specify the target framework using `-f|--framework` argument. For the sake of simplicity, all examples below use `netcoreapp3.0` as the target framework.
15+
The first thing that you need to choose is the Target Framework. Available options are: `netcoreapp2.1|netcoreapp3.0|netcoreapp3.1|netcoreapp5.0|net461`. You can specify the target framework using `-f|--framework` argument. For the sake of simplicity, all examples below use `netcoreapp5.0` as the target framework.
1616

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

1919
To run the benchmarks in Interactive Mode, where you will be asked which benchmark(s) to run:
2020

2121
```cmd
22-
dotnet run -c Release -f netcoreapp3.0
22+
dotnet run -c Release -f netcoreapp5.0
2323
```
2424

2525
To list all available benchmarks ([read more](../../../docs/benchmarkdotnet.md#Listing-the-Benchmarks)):
2626

2727
```cmd
28-
dotnet run -c Release -f netcoreapp3.0 --list flat|tree
28+
dotnet run -c Release -f netcoreapp5.0 --list flat|tree
2929
```
3030

3131
To filter the benchmarks using a glob pattern applied to namespace.typeName.methodName ([read more](../../../docs/benchmarkdotnet.md#Filtering-the-Benchmarks)):
3232

3333
```cmd
34-
dotnet run -c Release -f netcoreapp3.0 --filter *Span*
34+
dotnet run -c Release -f netcoreapp5.0 --filter *Span*
3535
```
3636

3737
To profile the benchmarked code and produce an ETW Trace file ([read more](../../../docs/benchmarkdotnet.md#Profiling)):
3838

3939
```cmd
40-
dotnet run -c Release -f netcoreapp3.0 --filter $YourFilter --profiler ETW
40+
dotnet run -c Release -f netcoreapp5.0 --filter $YourFilter --profiler ETW
4141
```
4242

4343
To run the benchmarks for multiple runtimes ([read more](../../../docs/benchmarkdotnet.md#Multiple-Runtimes)):
4444

4545
```cmd
46-
dotnet run -c Release -f netcoreapp2.1 --filter * --runtimes netcoreapp2.1 netcoreapp3.0 corert
46+
dotnet run -c Release -f netcoreapp3.1 --filter * --runtimes netcoreapp3.1 netcoreapp5.0 corert
4747
```
4848

4949
## Private Runtime Builds

Diff for: src/benchmarks/micro/libraries/System.Buffers/ReadOnlySequenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class ReadOnlySequenceTests<T>
2929
[Benchmark(OperationsPerInvoke = 16)]
3030
public int FirstArray() => First(new ReadOnlySequence<T>(_array));
3131

32-
#if !NETFRAMEWORK && !NETCOREAPP2_1 && !NETCOREAPP2_2
32+
#if !NETFRAMEWORK && !NETCOREAPP2_1
3333
[Benchmark(OperationsPerInvoke = 16)]
3434
public int FirstSpanArray() => FirstSpan(new ReadOnlySequence<T>(_array));
3535

Diff for: src/benchmarks/micro/libraries/System.Collections/Contains/ContainsFalse.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public bool Array()
6666
return result;
6767
}
6868

69-
#if !NETFRAMEWORK && !NETCOREAPP2_1 && !NETCOREAPP2_2
69+
#if !NETFRAMEWORK && !NETCOREAPP2_1
7070
[BenchmarkCategory(Categories.Span)]
7171
[Benchmark]
7272
public bool Span()

Diff for: src/benchmarks/micro/libraries/System.Collections/Contains/ContainsTrue.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public bool Array()
6363
return result;
6464
}
6565

66-
#if !NETFRAMEWORK && !NETCOREAPP2_1 && !NETCOREAPP2_2
66+
#if !NETFRAMEWORK && !NETCOREAPP2_1
6767
[BenchmarkCategory(Categories.Span)]
6868
[Benchmark]
6969
public bool Span()

Diff for: src/benchmarks/micro/libraries/System.Linq/Perf.Enumerable.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ public IEnumerable<object> ElementAtArguments()
402402
[Benchmark]
403403
public void EmptyTakeSelectToArray() => Enumerable.Empty<int>().Take(10).Select(i => i).ToArray();
404404

405-
#if !NETFRAMEWORK && !NETCOREAPP2_1 && !NETCOREAPP2_2 // API Available in .NET Core 3.0+
405+
#if !NETFRAMEWORK && !NETCOREAPP2_1 // API Available in .NET Core 3.0+
406406
// Append() has two execution paths: AppendPrependIterator (a result of another Append or Prepend) and IEnumerable, this benchmark tests both
407407
// https://github.com/dotnet/corefx/blob/dcf1c8f51bcdbd79e08cc672e327d50612690a25/src/System.Linq/src/System/Linq/AppendPrepend.cs
408408
[Benchmark]

Diff for: src/benchmarks/micro/runtime/BilinearInterpol/BilinearInterpol.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Numerics;
99

1010
// HW Intrinsic APIs are available only in .NET Core 3.0+
11-
#if !NETCOREAPP2_1 && !NETCOREAPP2_2 && !NETFRAMEWORK
11+
#if !NETCOREAPP2_1 && !NETFRAMEWORK
1212
using System.Runtime.Intrinsics;
1313
using System.Runtime.Intrinsics.X86;
1414
#endif
@@ -193,7 +193,7 @@ private double[] BilinearInterpol_Vector(
193193
return z;
194194
}
195195

196-
#if !NETCOREAPP2_1 && !NETCOREAPP2_2 && !NETFRAMEWORK
196+
#if !NETCOREAPP2_1 && !NETFRAMEWORK
197197
private static unsafe double[] BilinearInterpol_AVX(
198198
double[] x,
199199
double[] A,
@@ -273,7 +273,7 @@ private static unsafe double[] BilinearInterpol_AVX(
273273
}
274274
return z;
275275
}
276-
#endif // !NETCOREAPP2_1 && !NETCOREAPP2_2 && !NETFRAMEWORK
276+
#endif // !NETCOREAPP2_1 && !NETFRAMEWORK
277277

278278
// This method is currently unused. It is useful, when generating a new vectorized version
279279
// of the benchmark (e.g. with a different set of HW intrinsics), to ensure that it is
@@ -309,7 +309,7 @@ public double[] Interpol_Vector()
309309
return vectorOutput;
310310
}
311311

312-
#if !NETCOREAPP2_1 && !NETCOREAPP2_2 && !NETFRAMEWORK
312+
#if !NETCOREAPP2_1 && !NETFRAMEWORK
313313
[BenchmarkCategory(Categories.Runtime)]
314314
[Benchmark]
315315
public double[] Interpol_AVX()

Diff for: src/benchmarks/micro/runtime/System.Reflection/Activator.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class Activator<T>
2121
[Benchmark]
2222
public object CreateInstanceType() => System.Activator.CreateInstance(typeof(T));
2323

24-
#if !NETCOREAPP2_1 && !NETCOREAPP2_2 // API available in Full .NET Framework and .NET Core 3.0+
24+
#if !NETCOREAPP2_1 // API available in Full .NET Framework and .NET Core 3.0+
2525
[Benchmark]
2626
public object CreateInstanceNames() => System.Activator.CreateInstance(_assemblyName, _typeName);
2727
#endif

Diff for: src/tools/ResultsComparer/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ It can be used to compare:
66
* historical results (eg. before and after my changes)
77
* results for different OSes (eg. Windows vs Ubuntu)
88
* results for different CPU architectures (eg. x64 vs ARM64)
9-
* results for different target frameworks (eg. .NET Core 2.1 vs 2.2)
9+
* results for different target frameworks (eg. .NET Core 3.1 vs 5.0)
1010

1111
All you need to provide is:
1212
* `--base` - path to folder/file with baseline results

0 commit comments

Comments
 (0)