You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`-f net6.0` sets the new template project targeting `net6.0` framework; `-c Release` configures the publish to be in release; `-r win-x64` takes an [RID](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)(Runtime Identifier) and specifies which runtime it supports.
40
+
`-f net7.0` sets the new template project targeting `net7.0` framework; `-c Release` configures the publish to be in release; `-r win-x64` takes an [RID](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)(Runtime Identifier) and specifies which runtime it supports.
41
41
42
42
**Note that by specifying RID option `-r <RID>`, it defaults to publish the app into a [SCD](https://docs.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained)(Self-contained Deployment) app; without it, a [FDD](https://docs.microsoft.com/en-us/dotnet/core/deploying/#publish-framework-dependent)(Framework Dependent Deployment) app will be published.**
43
43
@@ -81,31 +81,30 @@ Same instruction of [Scenario Tests Guide - Step 4](./scenarios-workflow.md#step
81
81
## Command Matrix
82
82
83
83
-\<tfm> values:
84
-
- netcoreapp2.1
85
84
- netcoreapp3.1
86
-
- net5.0
87
85
- net6.0
86
+
- net7.0
88
87
-\<-r RID> values:
89
88
- ""(WITHOUT `-r <RID>` --> FDD app)
90
89
-`"-r <RID>"` (WITH `-r` --> SCD app, [list of RID](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog))
Copy file name to clipboardExpand all lines: docs/benchmarkdotnet.md
+30-33
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ In order to build or run the benchmarks you will need the **.NET Core command-li
59
59
60
60
### Using .NET Cli
61
61
62
-
To build the benchmarks you need to have the right `dotnet cli`. This repository allows to benchmark .NET Core 2.1, 3.1, 5.0 and 6.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 you to benchmark .NET Core 3.1, .NET 6.0 and .NET 7.0 so you need to install all of them.
63
63
64
64
All you need to do is run the following command:
65
65
@@ -70,8 +70,8 @@ dotnet build -c Release
70
70
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 [MicroBenchmarks.csproj](../src/benchmarks/micro/MicroBenchmarks.csproj) file.
The alternative is to set `PERFLAB_TARGET_FRAMEWORKS` environment variable to selected Target Framework Moniker.
@@ -81,7 +81,7 @@ The alternative is to set `PERFLAB_TARGET_FRAMEWORKS` environment variable to se
81
81
If you don't want to install `dotnet cli` manually, we have a Python 3 script which can do that for you. All you need to do is to provide the frameworks:
To run the benchmarks in interactive mode you have to execute `dotnet run -c Release -f $targetFrameworkMoniker` in the folder with benchmarks project.
92
92
93
93
```cmd
94
-
C:\Projects\performance\src\benchmarks\micro> dotnet run -c Release -f net6.0
94
+
C:\Projects\performance\src\benchmarks\micro> dotnet run -c Release -f net7.0
95
95
Available Benchmarks:
96
96
#0 Burgers
97
97
#1 ByteMark
@@ -122,37 +122,37 @@ The glob patterns are applied to full benchmark name: namespace.typeName.methodN
122
122
- Run all the benchmarks from BenchmarksGame namespace:
123
123
124
124
```cmd
125
-
dotnet run -c Release -f net6.0 --filter BenchmarksGame*
125
+
dotnet run -c Release -f net7.0 --filter BenchmarksGame*
126
126
```
127
127
128
128
- Run all the benchmarks with type name Richards:
129
129
130
130
```cmd
131
-
dotnet run -c Release -f net6.0 --filter *.Richards.*
131
+
dotnet run -c Release -f net7.0 --filter *.Richards.*
132
132
```
133
133
134
134
- Run all the benchmarks with method name ToStream:
135
135
136
136
```cmd
137
-
dotnet run -c Release -f net6.0 --filter *.ToStream
137
+
dotnet run -c Release -f net7.0 --filter *.ToStream
138
138
```
139
139
140
140
- Run ALL benchmarks:
141
141
142
142
```cmd
143
-
dotnet run -c Release -f net6.0 --filter *
143
+
dotnet run -c Release -f net7.0 --filter *
144
144
```
145
145
146
146
- You can provide many filters (logical disjunction):
147
147
148
148
```cmd
149
-
dotnet run -c Release -f net6.0 --filter System.Collections*.Dictionary* *.Perf_Dictionary.*
149
+
dotnet run -c Release -f net7.0 --filter System.Collections*.Dictionary* *.Perf_Dictionary.*
150
150
```
151
151
152
152
- To print a **joined summary** for all of the benchmarks (by default printed per type), use `--join`:
153
153
154
154
```cmd
155
-
dotnet run -c Release -f net6.0 --filter BenchmarksGame* --join
155
+
dotnet run -c Release -f net7.0 --filter BenchmarksGame* --join
156
156
```
157
157
158
158
Please remember that on **Unix** systems `*` is resolved to all files in current directory, so you need to escape it `'*'`.
@@ -161,10 +161,10 @@ Please remember that on **Unix** systems `*` is resolved to all files in current
161
161
162
162
To print the list of all available benchmarks you need to pass `--list [tree/flat]` argument. It can also be combined with `--filter` option.
163
163
164
-
Example: Show the tree of all the benchmarks from System.Threading namespace that can be run for .NET 6.0:
164
+
Example: Show the tree of all the benchmarks from System.Threading namespace that can be run for .NET 7.0:
165
165
166
166
```cmd
167
-
dotnet run -c Release -f net6.0 --list tree --filter System.Threading*
167
+
dotnet run -c Release -f net7.0 --list tree --filter System.Threading*
168
168
```
169
169
170
170
```log
@@ -259,7 +259,7 @@ If you want to disassemble the benchmarked code, you need to use the [Disassembl
259
259
260
260
You can do that by passing `--disassm` to the app or by using `[DisassemblyDiagnoser(printAsm: true, printSource: true)]` attribute or by adding it to your config with `config.With(DisassemblyDiagnoser.Create(new DisassemblyDiagnoserConfig(printAsm: true, recursiveDepth: 1))`.
The `--runtimes` or just `-r` allows you to run the benchmarks for **multiple Runtimes**.
287
287
288
-
Available options are: Mono, CoreRT, net461, net462, net47, net471, net472, netcoreapp3.1, net5.0 and net6.0.
288
+
Available options are: Mono, CoreRT, net461, net462, net47, net471, net472, netcoreapp3.1, net6.0 and net7.0.
289
289
290
-
Example: run the benchmarks for .NET 5.0 and 6.0:
290
+
Example: run the benchmarks for .NET 6.0 and 7.0:
291
291
292
292
```cmd
293
-
dotnet run -c Release -f net5.0 --runtimes net5.0 net6.0
293
+
dotnet run -c Release -f net6.0 --runtimes net6.0 net7.0
294
294
```
295
295
296
-
**Important: The host process needs to be the lowest common API denominator of the runtimes you want to compare!** In this case, it was `net5.0`.
296
+
**Important: The host process needs to be the lowest common API denominator of the runtimes you want to compare!** In this case, it was `net6.0`.
297
297
298
298
## Regressions
299
299
300
300
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)
301
301
302
-
Example: run Mann–Whitney U test with relative ratio of 5% for `BinaryTrees_2` for .NET 5.0 (base) vs .NET 6.0 (diff). .NET Core 5.0 will be baseline because it was first.
302
+
Example: run Mann–Whitney U test with relative ratio of 5% for `BinaryTrees_2` for .NET 6.0 (base) vs .NET 7.0 (diff). .NET 6.0 will be baseline because it was first.
**Note:** to compare the historical results you need to use [Results Comparer](../src/tools/ResultsComparer/README.md)
314
314
@@ -329,24 +329,21 @@ Please use this option only when you are sure that the benchmarks you want to ru
329
329
It's possible to benchmark private builds of [dotnet/runtime](https://github.com/dotnet/runtime) using CoreRun.
330
330
331
331
```cmd
332
-
dotnet run -c Release -f net6.0 --coreRun $thePath
332
+
dotnet run -c Release -f net7.0 --coreRun $thePath
333
333
```
334
334
335
335
**Note:** You can provide more than 1 path to CoreRun. In such case, the first path will be the baseline and all the benchmarks are going to be executed for all CoreRuns you have specified.
336
336
337
337
**Note:** If `CoreRunToolchain` detects that you have some older version of dependencies required to run the benchmarks in CoreRun folder, it's going to overwrite them with newer versions from the published app. It's going to do that in a shadow copy of the folder with CoreRun, so your configuration remains untouched.
338
338
339
-
If you are not sure which assemblies gets loaded and used you can use the following code to find out:
339
+
If you are not sure which assemblies are loaded and used you can use the following code to find out:
Console.WriteLine($"// CoreFx version: {coreFxAssemblyInfo.FileVersion}, location {typeof(Regex).GetTypeInfo().Assembly.Location}, product version {coreFxAssemblyInfo.ProductVersion}");
349
-
Console.WriteLine($"// CoreClr version {coreClrAssemblyInfo.FileVersion}, location {typeof(object).GetTypeInfo().Assembly.Location}, product version {coreClrAssemblyInfo.ProductVersion}");
Console.WriteLine($"// System.Private.CoreLib version {systemPrivateCoreLib.FileVersion}, location {typeof(object).Assembly.Location}, product version {systemPrivateCoreLib.ProductVersion}");
350
347
}
351
348
```
352
349
@@ -355,10 +352,10 @@ public void PrintInfo()
355
352
You can also use any dotnet cli to build and run the benchmarks.
356
353
357
354
```cmd
358
-
dotnet run -c Release -f net6.0 --cli "C:\Projects\performance\.dotnet\dotnet.exe"
355
+
dotnet run -c Release -f net7.0 --cli "C:\Projects\performance\.dotnet\dotnet.exe"
359
356
```
360
357
361
-
This is very useful when you want to compare different builds of .NET Core SDK.
358
+
This is very useful when you want to compare different builds of .NET.
362
359
363
360
### Private CLR Build
364
361
@@ -367,7 +364,7 @@ It's possible to benchmark a private build of .NET Runtime. You just need to pas
367
364
So if you made a change in CLR and want to measure the difference, you can run the benchmarks with:
368
365
369
366
```cmd
370
-
dotnet run -c Release -f net472 -- --clrVersion $theVersion
367
+
dotnet run -c Release -f net48 -- --clrVersion $theVersion
371
368
```
372
369
373
370
More info can be found [here](https://github.com/dotnet/BenchmarkDotNet/issues/706).
@@ -377,5 +374,5 @@ More info can be found [here](https://github.com/dotnet/BenchmarkDotNet/issues/7
377
374
To run benchmarks with private CoreRT build you need to provide the `IlcPath`. Example:
378
375
379
376
```cmd
380
-
dotnet run -c Release -f net6.0 -- --ilcPath C:\Projects\corert\bin\Windows_NT.x64.Release
377
+
dotnet run -c Release -f net7.0 -- --ilcPath C:\Projects\corert\bin\Windows_NT.x64.Release
0 commit comments