-
Notifications
You must be signed in to change notification settings - Fork 143
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
[Dynamic Instrumentation] Remove async void in SymbolsUploader #5155
Conversation
@@ -136,9 +136,9 @@ private void UnRegisterToAssemblyLoadEvent() | |||
AppDomain.CurrentDomain.AssemblyLoad -= CurrentDomain_AssemblyLoad; | |||
} | |||
|
|||
private async void CurrentDomain_AssemblyLoad(object? sender, AssemblyLoadEventArgs args) |
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.
we need an analyzer to detect this pattern.
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.
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.
ok, looked at it, and it complains about a lot of things 😂 https://github.com/DataDog/dd-trace-dotnet/tree/andrew/ci/add-async-analyzer
Datadog ReportBranch report: ❌ 1 Failed (0 Known Flaky), 308177 Passed, 2021 Skipped, 40m 49.46s Wall Time ❌ Failed Tests (1)
|
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.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5155) - mean (76ms) : 63, 89
. : milestone, 76,
master - mean (75ms) : 70, 80
. : milestone, 75,
section CallTarget+Inlining+NGEN
This PR (5155) - mean (985ms) : 965, 1005
. : milestone, 985,
master - mean (988ms) : 968, 1008
. : milestone, 988,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5155) - mean (111ms) : 108, 115
. : milestone, 111,
master - mean (113ms) : 109, 116
. : milestone, 113,
section CallTarget+Inlining+NGEN
This PR (5155) - mean (718ms) : 692, 744
. : milestone, 718,
master - mean (723ms) : 703, 742
. : milestone, 723,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5155) - mean (94ms) : 91, 96
. : milestone, 94,
master - mean (97ms) : 93, 100
. : milestone, 97,
section CallTarget+Inlining+NGEN
This PR (5155) - mean (676ms) : 649, 703
. : milestone, 676,
master - mean (678ms) : 653, 702
. : milestone, 678,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5155) - mean (188ms) : 185, 191
. : milestone, 188,
master - mean (187ms) : 184, 190
. : milestone, 187,
section CallTarget+Inlining+NGEN
This PR (5155) - mean (1,060ms) : 1041, 1080
. : milestone, 1060,
master - mean (1,058ms) : 1037, 1079
. : milestone, 1058,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5155) - mean (272ms) : 266, 277
. : milestone, 272,
master - mean (270ms) : 265, 275
. : milestone, 270,
section CallTarget+Inlining+NGEN
This PR (5155) - mean (1,061ms) : 1041, 1082
. : milestone, 1061,
master - mean (1,058ms) : 1030, 1086
. : milestone, 1058,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5155) - mean (260ms) : 256, 264
. : milestone, 260,
master - mean (259ms) : 254, 264
. : milestone, 259,
section CallTarget+Inlining+NGEN
This PR (5155) - mean (994ms) : 971, 1018
. : milestone, 994,
master - mean (991ms) : 966, 1016
. : milestone, 991,
|
Throughput/Crank Report:zap:Throughput results for AspNetCoreSimpleController comparing the following branches/commits: Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red. Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards! gantt
title Throughput Linux x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5155) (10.819M) : 0, 10819334
master (10.762M) : 0, 10761999
benchmarks/2.9.0 (11.160M) : 0, 11159568
section Automatic
This PR (5155) (7.518M) : 0, 7518113
master (5.722M) : 0, 5722409
benchmarks/2.9.0 (8.094M) : 0, 8093917
section Trace stats
This PR (5155) (7.868M) : 0, 7868325
master (7.764M) : 0, 7764178
section Manual
This PR (5155) (9.521M) : 0, 9520862
master (9.405M) : 0, 9404543
section Manual + Automatic
This PR (5155) (7.073M) : 0, 7073054
master (7.093M) : 0, 7092517
section Version Conflict
This PR (5155) (6.360M) : 0, 6360494
master (6.325M) : 0, 6325056
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5155) (9.400M) : 0, 9399575
master (9.555M) : 0, 9555430
benchmarks/2.9.0 (9.576M) : 0, 9576035
section Automatic
This PR (5155) (6.780M) : 0, 6779698
master (6.605M) : 0, 6604545
section Trace stats
This PR (5155) (6.999M) : 0, 6999230
master (6.788M) : 0, 6788095
section Manual
This PR (5155) (8.409M) : 0, 8409070
master (8.511M) : 0, 8510867
section Manual + Automatic
This PR (5155) (6.289M) : 0, 6289498
master (6.227M) : 0, 6227413
section Version Conflict
This PR (5155) (5.696M) : 0, 5696268
master (5.790M) : 0, 5789961
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5155) (10.222M) : 0, 10222311
master (8.718M) : 0, 8717919
benchmarks/2.9.0 (9.627M) : 0, 9627029
section Automatic
This PR (5155) (7.208M) : 0, 7207803
master (6.273M) : 0, 6273234
benchmarks/2.9.0 (7.280M) : 0, 7279862
section Trace stats
This PR (5155) (7.483M) : 0, 7482778
master (7.466M) : 0, 7465801
section Manual
This PR (5155) (8.871M) : 0, 8870872
master (8.690M) : 0, 8689661
section Manual + Automatic
This PR (5155) (6.917M) : 0, 6917248
master (6.763M) : 0, 6762657
section Version Conflict
This PR (5155) (6.176M) : 0, 6176245
master (6.145M) : 0, 6145260
gantt
title Throughput Linux x64 (ASM) (Total requests)
dateFormat X
axisFormat %s
section Baseline
master (7.405M) : 0, 7405418
benchmarks/2.9.0 (7.799M) : 0, 7798783
section No attack
master (1.822M) : 0, 1821685
benchmarks/2.9.0 (3.256M) : 0, 3255670
section Attack
master (1.465M) : 0, 1465312
benchmarks/2.9.0 (2.530M) : 0, 2529607
section Blocking
master (3.147M) : 0, 3147045
section IAST default
master (6.387M) : 0, 6386517
section IAST full
master (5.602M) : 0, 5602399
section Base vuln
master (0.934M) : 0, 934358
section IAST vuln
master (0.868M) : 0, 868269
|
Benchmarks Report 🐌Benchmarks for #5155 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 ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.53 KB | 41.74 KB | 209 B | 0.50% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 541μs | 1.33μs | 5.13μs | 0.548 | 0 | 0 | 41.53 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 653μs | 1.1μs | 4.26μs | 0.324 | 0 | 0 | 41.78 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 798μs | 3.97μs | 17.3μs | 8.17 | 2.45 | 0.408 | 53.22 KB |
#5155 | WriteAndFlushEnrichedTraces |
net6.0 | 564μs | 139ns | 537ns | 0.548 | 0 | 0 | 41.74 KB |
#5155 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 644μs | 367ns | 1.32μs | 0.317 | 0 | 0 | 41.75 KB |
#5155 | WriteAndFlushEnrichedTraces |
net472 | 829μs | 3.19μs | 11.9μs | 8.28 | 2.48 | 0.414 | 53.24 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.21μs | 0.52ns | 1.95ns | 0.0103 | 0 | 0 | 776 B |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.49μs | 0.734ns | 2.84ns | 0.00958 | 0 | 0 | 776 B |
master | ExecuteNonQuery |
net472 | 1.84μs | 0.653ns | 2.53ns | 0.116 | 0 | 0 | 738 B |
#5155 | ExecuteNonQuery |
net6.0 | 1.17μs | 0.677ns | 2.62ns | 0.0105 | 0 | 0 | 776 B |
#5155 | ExecuteNonQuery |
netcoreapp3.1 | 1.5μs | 0.806ns | 3.12ns | 0.00987 | 0 | 0 | 776 B |
#5155 | ExecuteNonQuery |
net472 | 1.86μs | 1.42ns | 5.51ns | 0.117 | 0 | 0 | 738 B |
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #5155
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0
1.179
1,135.00
1,338.25
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 | 1.179 | 1,135.00 | 1,338.25 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.13μs | 0.547ns | 2.05ns | 0.0131 | 0 | 0 | 944 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.56μs | 1.34ns | 5.2ns | 0.0125 | 0 | 0 | 944 B |
master | CallElasticsearch |
net472 | 2.52μs | 1.19ns | 4.61ns | 0.152 | 0 | 0 | 963 B |
master | CallElasticsearchAsync |
net6.0 | 1.3μs | 0.792ns | 2.96ns | 0.0125 | 0 | 0 | 920 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.54μs | 1.27ns | 4.39ns | 0.013 | 0 | 0 | 992 B |
master | CallElasticsearchAsync |
net472 | 2.54μs | 1.1ns | 4.26ns | 0.161 | 0 | 0 | 1.02 KB |
#5155 | CallElasticsearch |
net6.0 | 1.34μs | 0.595ns | 2.23ns | 0.0127 | 0 | 0 | 944 B |
#5155 | CallElasticsearch |
netcoreapp3.1 | 1.44μs | 0.937ns | 3.5ns | 0.0123 | 0 | 0 | 944 B |
#5155 | CallElasticsearch |
net472 | 2.48μs | 1.35ns | 5.21ns | 0.152 | 0 | 0 | 963 B |
#5155 | CallElasticsearchAsync |
net6.0 | 1.24μs | 0.51ns | 1.97ns | 0.0125 | 0 | 0 | 920 B |
#5155 | CallElasticsearchAsync |
netcoreapp3.1 | 1.7μs | 1.15ns | 4.45ns | 0.0133 | 0 | 0 | 992 B |
#5155 | CallElasticsearchAsync |
net472 | 2.6μs | 0.956ns | 3.7ns | 0.161 | 0 | 0 | 1.02 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.31μs | 0.743ns | 2.78ns | 0.013 | 0 | 0 | 920 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.59μs | 1.03ns | 3.84ns | 0.0127 | 0 | 0 | 920 B |
master | ExecuteAsync |
net472 | 1.83μs | 1.12ns | 4.35ns | 0.14 | 0 | 0 | 883 B |
#5155 | ExecuteAsync |
net6.0 | 1.31μs | 0.652ns | 2.44ns | 0.013 | 0 | 0 | 920 B |
#5155 | ExecuteAsync |
netcoreapp3.1 | 1.61μs | 0.829ns | 3.21ns | 0.0128 | 0 | 0 | 920 B |
#5155 | ExecuteAsync |
net472 | 1.9μs | 0.749ns | 2.9ns | 0.14 | 0 | 0 | 883 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 | 4.02μs | 1.47ns | 5.5ns | 0.0285 | 0 | 0 | 2.1 KB |
master | SendAsync |
netcoreapp3.1 | 4.9μs | 1.45ns | 5.23ns | 0.0343 | 0 | 0 | 2.64 KB |
master | SendAsync |
net472 | 7.7μs | 27.2ns | 94.3ns | 0.525 | 0 | 0 | 3.31 KB |
#5155 | SendAsync |
net6.0 | 4.18μs | 1.77ns | 6.87ns | 0.0293 | 0 | 0 | 2.1 KB |
#5155 | SendAsync |
netcoreapp3.1 | 5.02μs | 2.92ns | 10.9ns | 0.035 | 0 | 0 | 2.64 KB |
#5155 | SendAsync |
net472 | 7.76μs | 2.6ns | 10.1ns | 0.525 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #5155
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
59.26 KB
61.9 KB
2.65 KB
4.47%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
202.51 KB
204.7 KB
2.18 KB
1.08%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 59.26 KB | 61.9 KB | 2.65 KB | 4.47% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 202.51 KB | 204.7 KB | 2.18 KB | 1.08% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 61.8μs | 985ns | 9.55μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 55.8μs | 460ns | 4.46μs | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 37.9μs | 72.5ns | 261ns | 0 | 0 | 0 | 59.26 KB |
master | StringConcatAspectBenchmark |
net6.0 | 251μs | 4.07μs | 39.1μs | 0 | 0 | 0 | 203.98 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 284μs | 1.63μs | 12.1μs | 0 | 0 | 0 | 202.51 KB |
master | StringConcatAspectBenchmark |
net472 | 239μs | 2.84μs | 26.9μs | 0 | 0 | 0 | 221.18 KB |
#5155 | StringConcatBenchmark |
net6.0 | 52μs | 190ns | 657ns | 0 | 0 | 0 | 43.44 KB |
#5155 | StringConcatBenchmark |
netcoreapp3.1 | 52.7μs | 236ns | 884ns | 0 | 0 | 0 | 42.64 KB |
#5155 | StringConcatBenchmark |
net472 | 37.8μs | 137ns | 514ns | 0 | 0 | 0 | 61.9 KB |
#5155 | StringConcatAspectBenchmark |
net6.0 | 261μs | 1.23μs | 5.07μs | 0 | 0 | 0 | 203.53 KB |
#5155 | StringConcatAspectBenchmark |
netcoreapp3.1 | 271μs | 3.13μs | 30.3μs | 0 | 0 | 0 | 204.7 KB |
#5155 | StringConcatAspectBenchmark |
net472 | 225μs | 1.06μs | 4.37μs | 0 | 0 | 0 | 221.18 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 | 1.51μs | 2.18ns | 8.17ns | 0.0223 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.26μs | 3.22ns | 12.1ns | 0.0218 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
net472 | 2.73μs | 5.02ns | 19.5ns | 0.239 | 0 | 0 | 1.51 KB |
#5155 | EnrichedLog |
net6.0 | 1.6μs | 0.758ns | 2.84ns | 0.0221 | 0 | 0 | 1.58 KB |
#5155 | EnrichedLog |
netcoreapp3.1 | 2.11μs | 0.751ns | 2.81ns | 0.0212 | 0 | 0 | 1.58 KB |
#5155 | EnrichedLog |
net472 | 2.74μs | 2.41ns | 9.35ns | 0.239 | 0 | 0 | 1.51 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 | 112μs | 98.2ns | 368ns | 0.0562 | 0 | 0 | 4.22 KB |
master | EnrichedLog |
netcoreapp3.1 | 117μs | 111ns | 416ns | 0.0582 | 0 | 0 | 4.22 KB |
master | EnrichedLog |
net472 | 148μs | 43.7ns | 169ns | 0.662 | 0.221 | 0 | 4.4 KB |
#5155 | EnrichedLog |
net6.0 | 113μs | 98.3ns | 381ns | 0.0566 | 0 | 0 | 4.22 KB |
#5155 | EnrichedLog |
netcoreapp3.1 | 118μs | 141ns | 527ns | 0.0587 | 0 | 0 | 4.22 KB |
#5155 | EnrichedLog |
net472 | 148μs | 53.8ns | 201ns | 0.671 | 0.224 | 0 | 4.4 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 | 3.12μs | 1.04ns | 3.75ns | 0.0297 | 0 | 0 | 2.14 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.06μs | 1.28ns | 4.61ns | 0.0284 | 0 | 0 | 2.14 KB |
master | EnrichedLog |
net472 | 4.84μs | 1.42ns | 5.31ns | 0.309 | 0 | 0 | 1.95 KB |
#5155 | EnrichedLog |
net6.0 | 2.94μs | 0.986ns | 3.82ns | 0.0296 | 0 | 0 | 2.14 KB |
#5155 | EnrichedLog |
netcoreapp3.1 | 4.29μs | 3.31ns | 11.9ns | 0.0277 | 0 | 0 | 2.14 KB |
#5155 | EnrichedLog |
net472 | 4.8μs | 2.12ns | 8.2ns | 0.311 | 0 | 0 | 1.95 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendReceive |
net6.0 | 1.39μs | 0.775ns | 3ns | 0.0152 | 0 | 0 | 1.11 KB |
master | SendReceive |
netcoreapp3.1 | 1.79μs | 0.61ns | 2.28ns | 0.0152 | 0 | 0 | 1.11 KB |
master | SendReceive |
net472 | 2.18μs | 3.19ns | 12.4ns | 0.178 | 0 | 0 | 1.12 KB |
#5155 | SendReceive |
net6.0 | 1.35μs | 1.11ns | 3.85ns | 0.0155 | 0 | 0 | 1.11 KB |
#5155 | SendReceive |
netcoreapp3.1 | 1.78μs | 1.21ns | 4.69ns | 0.0151 | 0 | 0 | 1.11 KB |
#5155 | SendReceive |
net472 | 2.13μs | 2.26ns | 8.73ns | 0.178 | 0 | 0 | 1.12 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 | 2.77μs | 0.611ns | 2.37ns | 0.0221 | 0 | 0 | 1.54 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.98μs | 2.2ns | 8.52ns | 0.0199 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
net472 | 4.44μs | 2.24ns | 8.66ns | 0.312 | 0 | 0 | 1.97 KB |
#5155 | EnrichedLog |
net6.0 | 2.74μs | 0.87ns | 3.25ns | 0.0216 | 0 | 0 | 1.54 KB |
#5155 | EnrichedLog |
netcoreapp3.1 | 3.84μs | 1.09ns | 4.08ns | 0.0211 | 0 | 0 | 1.58 KB |
#5155 | EnrichedLog |
net472 | 4.46μs | 1.52ns | 5.68ns | 0.312 | 0 | 0 | 1.97 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #5155
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.155
438.19
506.26
Faster 🎉 in #5155
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1
1.119
871.03
778.65
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.155 | 438.19 | 506.26 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.119 | 871.03 | 778.65 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 438ns | 0.141ns | 0.545ns | 0.00757 | 0 | 0 | 544 B |
master | StartFinishSpan |
netcoreapp3.1 | 689ns | 0.606ns | 2.27ns | 0.00731 | 0 | 0 | 544 B |
master | StartFinishSpan |
net472 | 772ns | 0.464ns | 1.8ns | 0.0867 | 0 | 0 | 546 B |
master | StartFinishScope |
net6.0 | 534ns | 0.177ns | 0.687ns | 0.00941 | 0 | 0 | 664 B |
master | StartFinishScope |
netcoreapp3.1 | 871ns | 0.243ns | 0.941ns | 0.00885 | 0 | 0 | 664 B |
master | StartFinishScope |
net472 | 988ns | 0.431ns | 1.67ns | 0.0994 | 0 | 0 | 626 B |
#5155 | StartFinishSpan |
net6.0 | 506ns | 0.18ns | 0.697ns | 0.00752 | 0 | 0 | 544 B |
#5155 | StartFinishSpan |
netcoreapp3.1 | 727ns | 0.722ns | 2.7ns | 0.00732 | 0 | 0 | 544 B |
#5155 | StartFinishSpan |
net472 | 743ns | 0.221ns | 0.828ns | 0.0866 | 0 | 0 | 546 B |
#5155 | StartFinishScope |
net6.0 | 579ns | 0.138ns | 0.536ns | 0.00923 | 0 | 0 | 664 B |
#5155 | StartFinishScope |
netcoreapp3.1 | 779ns | 0.222ns | 0.832ns | 0.00874 | 0 | 0 | 664 B |
#5155 | StartFinishScope |
net472 | 1.05μs | 0.741ns | 2.87ns | 0.0993 | 0 | 0 | 626 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #5155
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
1.209
580.05
701.50
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 | 1.209 | 580.05 | 701.50 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 580ns | 0.129ns | 0.499ns | 0.00935 | 0 | 0 | 664 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 998ns | 0.369ns | 1.43ns | 0.00893 | 0 | 0 | 664 B |
master | RunOnMethodBegin |
net472 | 1.05μs | 0.569ns | 2.2ns | 0.0993 | 0 | 0 | 626 B |
#5155 | RunOnMethodBegin |
net6.0 | 701ns | 0.213ns | 0.823ns | 0.00922 | 0 | 0 | 664 B |
#5155 | RunOnMethodBegin |
netcoreapp3.1 | 925ns | 0.296ns | 1.11ns | 0.00874 | 0 | 0 | 664 B |
#5155 | RunOnMethodBegin |
net472 | 1μs | 0.326ns | 1.22ns | 0.0992 | 0 | 0 | 626 B |
4256e95
to
52274ca
Compare
{ | ||
await ProcessItemAsync(args.LoadedAssembly).ConfigureAwait(false); | ||
_ = ProcessItemAsync(args.LoadedAssembly); |
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 task is unobserved right, and given ProcessItemAsync
may throw (e.g. WaitAsync()
could throw Cancellation exception), could that not be an issue? It's a niche edgecase, but as I assume we just need another try-catch in ProcessItemAsync
, is that worth doing?
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.
Unobserved task exceptions are not an issue since .NET 4.5, but I guess it can't hurt to log the exception.
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.
Unobserved task exceptions are not an issue since .NET 4.5
For some reason I thought they were still a thing on .NET FX, in which case, meh
52274ca
to
2705330
Compare
Datadog ReportBranch report: ✅ 0 Failed, 329236 Passed, 2034 Skipped, 36m 9.05s Wall Time |
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.
LGTM
Summary of changes
Change
async void
method to a simple fire-and-forget.Reason for change
When an exception is thrown in an
async void
method, it's propagated to the synchronization context and it crashes the process. The caller can't await it anyway, so keeping it brings no benefits.