-
Notifications
You must be signed in to change notification settings - Fork 150
[Profiler] Generate heap snapshot #7681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just configuration, right? There's no implementation of taking the snapshot here?
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7681) - mean (71ms) : 70, 73
. : milestone, 71,
master - mean (71ms) : 70, 73
. : milestone, 71,
section Baseline
This PR (7681) - mean (68ms) : 66, 70
. : milestone, 68,
master - mean (68ms) : 66, 69
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (7681) - mean (1,040ms) : 999, 1081
. : milestone, 1040,
master - mean (1,039ms) : 1002, 1077
. : milestone, 1039,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7681) - mean (106ms) : 104, 107
. : milestone, 106,
master - mean (106ms) : 104, 107
. : milestone, 106,
section Baseline
This PR (7681) - mean (105ms) : 103, 107
. : milestone, 105,
master - mean (105ms) : 102, 107
. : milestone, 105,
section CallTarget+Inlining+NGEN
This PR (7681) - mean (743ms) : 720, 767
. : milestone, 743,
master - mean (742ms) : 724, 760
. : milestone, 742,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7681) - mean (94ms) : 92, 95
. : milestone, 94,
master - mean (93ms) : 93, 94
. : milestone, 93,
section Baseline
This PR (7681) - mean (93ms) : 91, 95
. : milestone, 93,
master - mean (93ms) : 91, 95
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (7681) - mean (704ms) : 679, 729
. : milestone, 704,
master - mean (704ms) : 670, 738
. : milestone, 704,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7681) - mean (92ms) : 91, 93
. : milestone, 92,
master - mean (92ms) : 91, 93
. : milestone, 92,
section Baseline
This PR (7681) - mean (92ms) : 89, 94
. : milestone, 92,
master - mean (91ms) : 89, 94
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (7681) - mean (656ms) : 642, 671
. : milestone, 656,
master - mean (659ms) : 646, 673
. : milestone, 659,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7681) - mean (197ms) : 192, 201
. : milestone, 197,
master - mean (195ms) : 193, 198
. : milestone, 195,
section Baseline
This PR (7681) - mean (192ms) : 189, 196
. : milestone, 192,
master - mean (193ms) : 188, 198
. : milestone, 193,
section CallTarget+Inlining+NGEN
This PR (7681) - mean (1,168ms) : 1104, 1233
. : milestone, 1168,
master - mean (1,171ms) : 1105, 1237
. : milestone, 1171,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7681) - mean (276ms) : 271, 282
. : milestone, 276,
master - mean (276ms) : 272, 281
. : milestone, 276,
section Baseline
This PR (7681) - mean (276ms) : 272, 280
. : milestone, 276,
master - mean (276ms) : 271, 280
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (7681) - mean (948ms) : 908, 989
. : milestone, 948,
master - mean (942ms) : 906, 978
. : milestone, 942,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7681) - mean (269ms) : 266, 272
. : milestone, 269,
master - mean (269ms) : 266, 272
. : milestone, 269,
section Baseline
This PR (7681) - mean (270ms) : 265, 275
. : milestone, 270,
master - mean (268ms) : 264, 273
. : milestone, 268,
section CallTarget+Inlining+NGEN
This PR (7681) - mean (923ms) : 881, 966
. : milestone, 923,
master - mean (924ms) : 874, 974
. : milestone, 924,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7681) - mean (269ms) : 264, 275
. : milestone, 269,
master - mean (268ms) : 266, 271
. : milestone, 268,
section Baseline
This PR (7681) - mean (268ms) : 264, 271
. : milestone, 268,
master - mean (268ms) : 264, 273
. : milestone, 268,
section CallTarget+Inlining+NGEN
This PR (7681) - mean (853ms) : 831, 874
. : milestone, 853,
master - mean (853ms) : 836, 870
. : milestone, 853,
|
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7681 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 5.98 KB | 6.01 KB | 32 B | 0.54% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 | 5.74 KB | 5.7 KB | -41 B | -0.71% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 11.1μs | 60.9ns | 350ns | 0 | 0 | 0 | 5.53 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 14.1μs | 65.1ns | 252ns | 0 | 0 | 0 | 5.74 KB |
| master | StartStopWithChild |
net472 | 22.2μs | 118ns | 588ns | 1.05 | 0.42 | 0.105 | 5.98 KB |
| #7681 | StartStopWithChild |
net6.0 | 10.7μs | 59.3ns | 375ns | 0 | 0 | 0 | 5.51 KB |
| #7681 | StartStopWithChild |
netcoreapp3.1 | 13.7μs | 64.9ns | 260ns | 0 | 0 | 0 | 5.7 KB |
| #7681 | StartStopWithChild |
net472 | 21.7μs | 119ns | 662ns | 0.983 | 0.328 | 0.109 | 6.01 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 932μs | 248ns | 959ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 123ns | 443ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.21ms | 1.08μs | 4.18μs | 0 | 0 | 0 | 3.31 KB |
| #7681 | WriteAndFlushEnrichedTraces |
net6.0 | 939μs | 222ns | 861ns | 0 | 0 | 0 | 2.7 KB |
| #7681 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.04ms | 274ns | 1.06μs | 0 | 0 | 0 | 2.7 KB |
| #7681 | WriteAndFlushEnrichedTraces |
net472 | 1.21ms | 218ns | 843ns | 0 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleSimpleBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleSimpleBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | ObjectExtractorSimpleBody |
net6.0 | 320ns | 1.58ns | 7.08ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 396ns | 2.24ns | 14.3ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 298ns | 0.0412ns | 0.16ns | 0.0435 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.29μs | 31.3ns | 133ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.91μs | 27ns | 104ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.7μs | 1.12ns | 4.2ns | 0.57 | 0 | 0 | 3.8 KB |
| #7681 | AllCycleSimpleBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7681 | AllCycleSimpleBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7681 | AllCycleSimpleBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7681 | AllCycleMoreComplexBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7681 | AllCycleMoreComplexBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7681 | AllCycleMoreComplexBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7681 | ObjectExtractorSimpleBody |
net6.0 | 326ns | 0.619ns | 2.23ns | 0 | 0 | 0 | 280 B |
| #7681 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 398ns | 2.1ns | 10.7ns | 0 | 0 | 0 | 272 B |
| #7681 | ObjectExtractorSimpleBody |
net472 | 299ns | 0.0942ns | 0.352ns | 0.0433 | 0 | 0 | 281 B |
| #7681 | ObjectExtractorMoreComplexBody |
net6.0 | 6.23μs | 32.2ns | 147ns | 0 | 0 | 0 | 3.78 KB |
| #7681 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.74μs | 37.6ns | 151ns | 0 | 0 | 0 | 3.69 KB |
| #7681 | ObjectExtractorMoreComplexBody |
net472 | 6.76μs | 2.75ns | 10.7ns | 0.572 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EncodeArgs |
net6.0 | 77.5μs | 77.4ns | 300ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.5μs | 298ns | 1.12μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 109μs | 6.9ns | 23.9ns | 4.9 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 145μs | 116ns | 449ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 196μs | 154ns | 578ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 262μs | 57.6ns | 223ns | 0 | 0 | 0 | 2.16 KB |
| #7681 | EncodeArgs |
net6.0 | 77.7μs | 110ns | 426ns | 0 | 0 | 0 | 32.4 KB |
| #7681 | EncodeArgs |
netcoreapp3.1 | 97.6μs | 157ns | 609ns | 0 | 0 | 0 | 32.4 KB |
| #7681 | EncodeArgs |
net472 | 108μs | 6.97ns | 26.1ns | 4.88 | 0 | 0 | 32.51 KB |
| #7681 | EncodeLegacyArgs |
net6.0 | 145μs | 125ns | 468ns | 0 | 0 | 0 | 2.15 KB |
| #7681 | EncodeLegacyArgs |
netcoreapp3.1 | 198μs | 91.3ns | 329ns | 0 | 0 | 0 | 2.14 KB |
| #7681 | EncodeLegacyArgs |
net472 | 263μs | 46.1ns | 178ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7681
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
2.459
298,696.95
734,486.31
Faster 🎉 in #7681
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
2.071
853,335.31
411,967.74
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.459 | 298,696.95 | 734,486.31 |
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.071 | 853,335.31 | 411,967.74 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 396μs | 162ns | 627ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 849μs | 3.78μs | 14.6μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 429μs | 101ns | 391ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 285μs | 29.5ns | 111ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 299μs | 145ns | 562ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 309μs | 44.6ns | 167ns | 0 | 0 | 0 | 2.29 KB |
| #7681 | RunWafRealisticBenchmark |
net6.0 | 405μs | 102ns | 393ns | 0 | 0 | 0 | 4.56 KB |
| #7681 | RunWafRealisticBenchmark |
netcoreapp3.1 | 412μs | 227ns | 851ns | 0 | 0 | 0 | 4.48 KB |
| #7681 | RunWafRealisticBenchmark |
net472 | 428μs | 59.5ns | 231ns | 0 | 0 | 0 | 4.66 KB |
| #7681 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 289μs | 25.2ns | 91ns | 0 | 0 | 0 | 2.24 KB |
| #7681 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 672μs | 14.5μs | 145μs | 0 | 0 | 0 | 2.22 KB |
| #7681 | RunWafRealisticBenchmarkWithAttack |
net472 | 310μs | 36.6ns | 142ns | 0 | 0 | 0 | 2.29 KB |
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 60.9μs | 46.9ns | 169ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.3μs | 81.7ns | 295ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00111ns | 0.000854ns | 0.00331ns | 0 | 0 | 0 | 0 b |
| #7681 | SendRequest |
net6.0 | 62.2μs | 36.3ns | 136ns | 0 | 0 | 0 | 14.52 KB |
| #7681 | SendRequest |
netcoreapp3.1 | 72.4μs | 106ns | 382ns | 0 | 0 | 0 | 17.42 KB |
| #7681 | SendRequest |
net472 | 0.00475ns | 0.00217ns | 0.00839ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Faster 🎉 Fewer allocations 🎉
Faster 🎉 in #7681
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
1.120
952,925.83
850,708.54
Fewer allocations 🎉 in #7681
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
7 B
4 B
-3 B
-42.86%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 1.120 | 952,925.83 | 850,708.54 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 7 B | 4 B | -3 B | -42.86% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.97ms | 262ns | 1.02μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.11ms | 3.29μs | 12.3μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.58ms | 2.82μs | 10.9μs | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.42ms | 223ns | 864ns | 0 | 0 | 0 | 7 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.7ms | 514ns | 1.99μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.95ms | 422ns | 1.63μs | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 858μs | 44ns | 165ns | 0 | 0 | 0 | 3 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 953μs | 77.6ns | 301ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.16ms | 296ns | 1.11μs | 0 | 0 | 0 | 47 B |
| #7681 | OriginalCharSlice |
net6.0 | 1.92ms | 6.28μs | 22.6μs | 0 | 0 | 0 | 640.01 KB |
| #7681 | OriginalCharSlice |
netcoreapp3.1 | 2.1ms | 10.4μs | 44.1μs | 0 | 0 | 0 | 640 KB |
| #7681 | OriginalCharSlice |
net472 | 2.63ms | 102ns | 380ns | 100 | 0 | 0 | 641.95 KB |
| #7681 | OptimizedCharSlice |
net6.0 | 1.5ms | 299ns | 1.16μs | 0 | 0 | 0 | 4 B |
| #7681 | OptimizedCharSlice |
netcoreapp3.1 | 1.7ms | 461ns | 1.72μs | 0 | 0 | 0 | 1 B |
| #7681 | OptimizedCharSlice |
net472 | 2.02ms | 583ns | 2.18μs | 0 | 0 | 0 | 73 B |
| #7681 | OptimizedCharSliceWithPool |
net6.0 | 938μs | 24.4ns | 87.9ns | 0 | 0 | 0 | 3 B |
| #7681 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 851μs | 24.7ns | 92.5ns | 0 | 0 | 0 | 0 b |
| #7681 | OptimizedCharSliceWithPool |
net472 | 1.13ms | 87.7ns | 328ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7681
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.65 KB
42.26 KB
608 B
1.46%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.82 KB
42.16 KB
342 B
0.82%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.65 KB | 42.26 KB | 608 B | 1.46% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.82 KB | 42.16 KB | 342 B | 0.82% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 644μs | 357ns | 1.38μs | 0 | 0 | 0 | 41.65 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 697μs | 3.94μs | 26.1μs | 0 | 0 | 0 | 41.82 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 953μs | 5.04μs | 27.6μs | 8.33 | 0 | 0 | 56.56 KB |
| #7681 | WriteAndFlushEnrichedTraces |
net6.0 | 639μs | 1.48μs | 5.74μs | 0 | 0 | 0 | 42.26 KB |
| #7681 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 729μs | 1.41μs | 5.07μs | 0 | 0 | 0 | 42.16 KB |
| #7681 | WriteAndFlushEnrichedTraces |
net472 | 890μs | 4.28μs | 18.7μs | 8.33 | 0 | 0 | 56.46 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteNonQuery |
net6.0 | 1.94μs | 8.03ns | 30.1ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.62μs | 6.36ns | 24.6ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.8μs | 4.5ns | 17.4ns | 0.152 | 0.0138 | 0 | 987 B |
| #7681 | ExecuteNonQuery |
net6.0 | 1.95μs | 2.32ns | 8.97ns | 0 | 0 | 0 | 1.02 KB |
| #7681 | ExecuteNonQuery |
netcoreapp3.1 | 2.62μs | 2.94ns | 11.4ns | 0 | 0 | 0 | 1.02 KB |
| #7681 | ExecuteNonQuery |
net472 | 2.84μs | 4.1ns | 15.9ns | 0.143 | 0.0143 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.76μs | 8.49ns | 32.9ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.21μs | 9.74ns | 39ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.59μs | 1.45ns | 5.23ns | 0.162 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.88μs | 8.7ns | 34.8ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.39μs | 7.77ns | 30.1ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.64μs | 5.06ns | 19.6ns | 0.162 | 0 | 0 | 1.1 KB |
| #7681 | CallElasticsearch |
net6.0 | 1.76μs | 6.43ns | 24.9ns | 0 | 0 | 0 | 1.03 KB |
| #7681 | CallElasticsearch |
netcoreapp3.1 | 2.21μs | 1.18ns | 4.56ns | 0 | 0 | 0 | 1.03 KB |
| #7681 | CallElasticsearch |
net472 | 3.47μs | 2.15ns | 8.33ns | 0.157 | 0 | 0 | 1.04 KB |
| #7681 | CallElasticsearchAsync |
net6.0 | 1.87μs | 9.77ns | 45.8ns | 0 | 0 | 0 | 1.01 KB |
| #7681 | CallElasticsearchAsync |
netcoreapp3.1 | 2.37μs | 7.82ns | 30.3ns | 0 | 0 | 0 | 1.08 KB |
| #7681 | CallElasticsearchAsync |
net472 | 3.67μs | 2.61ns | 10.1ns | 0.166 | 0 | 0 | 1.1 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net6.0 | 1.81μs | 3.82ns | 13.2ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.45μs | 5.15ns | 19.3ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.6μs | 1.63ns | 5.87ns | 0.143 | 0 | 0 | 915 B |
| #7681 | ExecuteAsync |
net6.0 | 1.85μs | 7.1ns | 27.5ns | 0 | 0 | 0 | 952 B |
| #7681 | ExecuteAsync |
netcoreapp3.1 | 2.51μs | 8.43ns | 32.7ns | 0 | 0 | 0 | 952 B |
| #7681 | ExecuteAsync |
net472 | 2.68μs | 1.02ns | 3.83ns | 0.134 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net6.0 | 6.93μs | 9.25ns | 34.6ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.94μs | 24.3ns | 94ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.2μs | 6.15ns | 23.8ns | 0.484 | 0 | 0 | 3.18 KB |
| #7681 | SendAsync |
net6.0 | 7.07μs | 10.1ns | 37.9ns | 0 | 0 | 0 | 2.36 KB |
| #7681 | SendAsync |
netcoreapp3.1 | 8.64μs | 15.7ns | 60.9ns | 0 | 0 | 0 | 2.9 KB |
| #7681 | SendAsync |
net472 | 12.6μs | 15.2ns | 58.9ns | 0.502 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7681
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
42.78 KB
86.15 KB
43.37 KB
101.36%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
57.34 KB
65.54 KB
8.19 KB
14.29%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
259.81 KB
275.36 KB
15.55 KB
5.99%
Fewer allocations 🎉 in #7681
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.86 KB
43.48 KB
-376 B
-0.86%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
286.72 KB
278.53 KB
-8.19 KB
-2.86%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 42.78 KB | 86.15 KB | 43.37 KB | 101.36% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 57.34 KB | 65.54 KB | 8.19 KB | 14.29% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 259.81 KB | 275.36 KB | 15.55 KB | 5.99% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.86 KB | 43.48 KB | -376 B | -0.86% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 286.72 KB | 278.53 KB | -8.19 KB | -2.86% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 42.2μs | 224ns | 1.29μs | 0 | 0 | 0 | 43.86 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 49.9μs | 346ns | 3.32μs | 0 | 0 | 0 | 42.78 KB |
| master | StringConcatBenchmark |
net472 | 57.3μs | 190ns | 713ns | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 519μs | 1.75μs | 7.01μs | 0 | 0 | 0 | 275.83 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 523μs | 1.68μs | 6.06μs | 0 | 0 | 0 | 259.81 KB |
| master | StringConcatAspectBenchmark |
net472 | 402μs | 2.06μs | 9.46μs | 0 | 0 | 0 | 286.72 KB |
| #7681 | StringConcatBenchmark |
net6.0 | 41μs | 113ns | 424ns | 0 | 0 | 0 | 43.48 KB |
| #7681 | StringConcatBenchmark |
netcoreapp3.1 | 49.6μs | 293ns | 2.69μs | 0 | 0 | 0 | 86.15 KB |
| #7681 | StringConcatBenchmark |
net472 | 56.7μs | 299ns | 1.53μs | 0 | 0 | 0 | 65.54 KB |
| #7681 | StringConcatAspectBenchmark |
net6.0 | 487μs | 2.02μs | 7.29μs | 0 | 0 | 0 | 276.74 KB |
| #7681 | StringConcatAspectBenchmark |
netcoreapp3.1 | 540μs | 1.76μs | 6.58μs | 0 | 0 | 0 | 275.36 KB |
| #7681 | StringConcatAspectBenchmark |
net472 | 410μs | 2.2μs | 15.4μs | 0 | 0 | 0 | 278.53 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 2.62μs | 4.21ns | 16.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.61μs | 5.23ns | 20.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.82μs | 4.37ns | 16.9ns | 0.249 | 0 | 0 | 1.64 KB |
| #7681 | EnrichedLog |
net6.0 | 2.59μs | 0.917ns | 3.43ns | 0 | 0 | 0 | 1.7 KB |
| #7681 | EnrichedLog |
netcoreapp3.1 | 3.69μs | 15.1ns | 58.5ns | 0 | 0 | 0 | 1.7 KB |
| #7681 | EnrichedLog |
net472 | 3.86μs | 5.19ns | 20.1ns | 0.25 | 0 | 0 | 1.64 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 125μs | 90ns | 324ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 130μs | 461ns | 1.79μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 167μs | 53.5ns | 207ns | 0 | 0 | 0 | 4.52 KB |
| #7681 | EnrichedLog |
net6.0 | 123μs | 53.9ns | 202ns | 0 | 0 | 0 | 4.31 KB |
| #7681 | EnrichedLog |
netcoreapp3.1 | 127μs | 126ns | 488ns | 0 | 0 | 0 | 4.31 KB |
| #7681 | EnrichedLog |
net472 | 167μs | 36.1ns | 140ns | 0 | 0 | 0 | 4.52 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.99μs | 17.8ns | 68.8ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.63μs | 18.3ns | 71ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.62μs | 4.39ns | 17ns | 0.305 | 0 | 0 | 2.08 KB |
| #7681 | EnrichedLog |
net6.0 | 5.1μs | 9.41ns | 35.2ns | 0 | 0 | 0 | 2.26 KB |
| #7681 | EnrichedLog |
netcoreapp3.1 | 7.03μs | 20.7ns | 80ns | 0 | 0 | 0 | 2.26 KB |
| #7681 | EnrichedLog |
net472 | 7.7μs | 6.47ns | 25.1ns | 0.31 | 0 | 0 | 2.08 KB |
Benchmarks.Trace.RedisBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7681
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.RedisBenchmark.SendReceive‑net472
1.118
2,919.23
3,264.91
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.RedisBenchmark.SendReceive‑net472 | 1.118 | 2,919.23 | 3,264.91 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendReceive |
net6.0 | 2μs | 9.98ns | 46.8ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.54μs | 8.9ns | 34.5ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 2.92μs | 4.66ns | 18ns | 0.189 | 0 | 0 | 1.2 KB |
| #7681 | SendReceive |
net6.0 | 2.03μs | 0.991ns | 3.71ns | 0 | 0 | 0 | 1.2 KB |
| #7681 | SendReceive |
netcoreapp3.1 | 2.68μs | 13.5ns | 61.7ns | 0 | 0 | 0 | 1.2 KB |
| #7681 | SendReceive |
net472 | 3.26μs | 3.38ns | 13.1ns | 0.179 | 0 | 0 | 1.2 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.54μs | 10.6ns | 39.6ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.84μs | 7.5ns | 29ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.53μs | 11.5ns | 44.5ns | 0.293 | 0 | 0 | 2.03 KB |
| #7681 | EnrichedLog |
net6.0 | 4.5μs | 12.1ns | 46.9ns | 0 | 0 | 0 | 1.58 KB |
| #7681 | EnrichedLog |
netcoreapp3.1 | 5.61μs | 3.99ns | 15.5ns | 0 | 0 | 0 | 1.63 KB |
| #7681 | EnrichedLog |
net472 | 6.68μs | 5.74ns | 21.5ns | 0.302 | 0 | 0 | 2.03 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 789ns | 2.71ns | 10.5ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 949ns | 4.98ns | 23.9ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 919ns | 0.352ns | 1.36ns | 0.0878 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 911ns | 0.197ns | 0.735ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.19μs | 6.36ns | 29.1ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.14μs | 0.63ns | 2.44ns | 0.102 | 0 | 0 | 658 B |
| #7681 | StartFinishSpan |
net6.0 | 780ns | 0.269ns | 1.01ns | 0 | 0 | 0 | 576 B |
| #7681 | StartFinishSpan |
netcoreapp3.1 | 964ns | 5.33ns | 32.9ns | 0 | 0 | 0 | 576 B |
| #7681 | StartFinishSpan |
net472 | 940ns | 0.375ns | 1.4ns | 0.0892 | 0 | 0 | 578 B |
| #7681 | StartFinishScope |
net6.0 | 925ns | 3.39ns | 12.7ns | 0 | 0 | 0 | 696 B |
| #7681 | StartFinishScope |
netcoreapp3.1 | 1.2μs | 0.623ns | 2.41ns | 0 | 0 | 0 | 696 B |
| #7681 | StartFinishScope |
net472 | 1.14μs | 0.357ns | 1.33ns | 0.103 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunOnMethodBegin |
net6.0 | 1.08μs | 5.09ns | 20.3ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.41μs | 2.82ns | 10.5ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.44μs | 0.459ns | 1.78ns | 0.101 | 0 | 0 | 658 B |
| #7681 | RunOnMethodBegin |
net6.0 | 1.05μs | 5.17ns | 23.1ns | 0 | 0 | 0 | 696 B |
| #7681 | RunOnMethodBegin |
netcoreapp3.1 | 1.4μs | 6.88ns | 29.2ns | 0 | 0 | 0 | 696 B |
| #7681 | RunOnMethodBegin |
net472 | 1.44μs | 1.01ns | 3.91ns | 0.101 | 0 | 0 | 658 B |
Summary of changes
Allow the generation of heap snapshots that are sent to the backend
Reason for change
For memory leak workflow, we would like to compare the surviving objects count to identify the leaky ones. These heap snapshots will be transformed into class histograms to look like what is generated by Java.
Implementation details
The .NET runtime allows the creation of "gcdump" thanks to dotnet-gcdump tool. Behind the scene, an induced GC is triggered when an event pipe session is created with the right keyword/verbosity. Undocumented events are then emitted by the runtime at the end of the GC - read https://chnasarre.medium.com/net-gcdump-internals-fcce5d327be7?source=friends_link&sk=3225ff119458adafc0e6935951fcc323 for more details.
Test coverage
Test added as needed
Other details