-
Notifications
You must be signed in to change notification settings - Fork 145
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
Handle case where SetExceptionTags()
throws
#5291
Conversation
SetTag(Trace.Tags.ErrorMsg, exception.Message); | ||
SetTag(Trace.Tags.ErrorStack, exception.ToString()); | ||
SetTag(Trace.Tags.ErrorType, exception.GetType().ToString()); | ||
SetTag(Trace.Tags.ErrorMsg, exception.Message); |
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.
Small nit: It might be easier to move the exception null-check until after the AggregateException if statement, since that if statement also functions as a null-check
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.
Does it make any difference 🤔 The current order is what we had previously, and I think you always need both checks, but with the current order, if it's null you can bail out straight away. With the other order, you would always do 2 checks I think?
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.
Yeah I suppose you're right, this is fine as-is 👍🏼
Datadog ReportBranch report: ✅ 0 Failed, 335974 Passed, 1598 Skipped, 45m 54.21s Wall Time |
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 (5291) - mean (74ms) : 66, 83
. : milestone, 74,
master - mean (74ms) : 65, 83
. : milestone, 74,
section CallTarget+Inlining+NGEN
This PR (5291) - mean (992ms) : 964, 1020
. : milestone, 992,
master - mean (985ms) : 961, 1008
. : milestone, 985,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5291) - mean (112ms) : 107, 118
. : milestone, 112,
master - mean (118ms) : 96, 140
. : milestone, 118,
section CallTarget+Inlining+NGEN
This PR (5291) - mean (719ms) : 697, 740
. : milestone, 719,
master - mean (713ms) : 691, 735
. : milestone, 713,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5291) - mean (94ms) : 91, 98
. : milestone, 94,
master - mean (95ms) : 91, 98
. : milestone, 95,
section CallTarget+Inlining+NGEN
This PR (5291) - mean (672ms) : 652, 693
. : milestone, 672,
master - mean (671ms) : 647, 694
. : milestone, 671,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5291) - mean (189ms) : 185, 192
. : milestone, 189,
master - mean (188ms) : 182, 193
. : milestone, 188,
section CallTarget+Inlining+NGEN
This PR (5291) - mean (1,066ms) : 1043, 1090
. : milestone, 1066,
master - mean (1,063ms) : 1038, 1089
. : milestone, 1063,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5291) - mean (271ms) : 267, 275
. : milestone, 271,
master - mean (269ms) : 262, 276
. : milestone, 269,
section CallTarget+Inlining+NGEN
This PR (5291) - mean (872ms) : 842, 902
. : milestone, 872,
master - mean (861ms) : 839, 884
. : milestone, 861,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5291) - mean (261ms) : 257, 264
. : milestone, 261,
master - mean (258ms) : 250, 265
. : milestone, 258,
section CallTarget+Inlining+NGEN
This PR (5291) - mean (853ms) : 827, 880
. : milestone, 853,
master - mean (855ms) : 834, 876
. : milestone, 855,
|
Benchmarks Report 🐌Benchmarks for #5291 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 - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net472 | 1.339 | 172.60 | 231.09 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | AllCycleSimpleBody |
net6.0 | 40.7μs | 12.8ns | 49.5ns | 0.0206 | 0 | 0 | 2.36 KB |
master | AllCycleSimpleBody |
netcoreapp3.1 | 43.8μs | 29.7ns | 107ns | 0.0219 | 0 | 0 | 2.34 KB |
master | AllCycleSimpleBody |
net472 | 46.5μs | 19.6ns | 75.8ns | 0.373 | 0 | 0 | 2.41 KB |
master | AllCycleMoreComplexBody |
net6.0 | 217μs | 125ns | 468ns | 0.108 | 0 | 0 | 9.84 KB |
master | AllCycleMoreComplexBody |
netcoreapp3.1 | 229μs | 119ns | 412ns | 0.114 | 0 | 0 | 9.73 KB |
master | AllCycleMoreComplexBody |
net472 | 240μs | 86.1ns | 334ns | 1.55 | 0 | 0 | 9.91 KB |
master | ObjectExtractorSimpleBody |
net6.0 | 145ns | 0.0831ns | 0.311ns | 0.00394 | 0 | 0 | 280 B |
master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 221ns | 0.21ns | 0.785ns | 0.0037 | 0 | 0 | 272 B |
master | ObjectExtractorSimpleBody |
net472 | 173ns | 0.137ns | 0.532ns | 0.0446 | 0 | 0 | 281 B |
master | ObjectExtractorMoreComplexBody |
net6.0 | 2.97μs | 1.32ns | 4.94ns | 0.0537 | 0 | 0 | 3.78 KB |
master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 4.16μs | 3.14ns | 12.2ns | 0.0497 | 0 | 0 | 3.69 KB |
master | ObjectExtractorMoreComplexBody |
net472 | 3.87μs | 2.78ns | 10.8ns | 0.603 | 0.00578 | 0 | 3.8 KB |
#5291 | AllCycleSimpleBody |
net6.0 | 40.5μs | 15.9ns | 57.2ns | 0.0204 | 0 | 0 | 2.36 KB |
#5291 | AllCycleSimpleBody |
netcoreapp3.1 | 44.2μs | 40.2ns | 150ns | 0.0219 | 0 | 0 | 2.34 KB |
#5291 | AllCycleSimpleBody |
net472 | 47μs | 10.5ns | 40.8ns | 0.375 | 0 | 0 | 2.41 KB |
#5291 | AllCycleMoreComplexBody |
net6.0 | 214μs | 107ns | 415ns | 0.107 | 0 | 0 | 9.84 KB |
#5291 | AllCycleMoreComplexBody |
netcoreapp3.1 | 226μs | 141ns | 545ns | 0.113 | 0 | 0 | 9.73 KB |
#5291 | AllCycleMoreComplexBody |
net472 | 240μs | 224ns | 866ns | 1.56 | 0 | 0 | 9.91 KB |
#5291 | ObjectExtractorSimpleBody |
net6.0 | 142ns | 0.105ns | 0.393ns | 0.00395 | 0 | 0 | 280 B |
#5291 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 199ns | 0.331ns | 1.28ns | 0.00369 | 0 | 0 | 272 B |
#5291 | ObjectExtractorSimpleBody |
net472 | 231ns | 0.0944ns | 0.353ns | 0.0446 | 0 | 0 | 281 B |
#5291 | ObjectExtractorMoreComplexBody |
net6.0 | 3.06μs | 1.43ns | 5.36ns | 0.0534 | 0 | 0 | 3.78 KB |
#5291 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 3.88μs | 2.45ns | 9.18ns | 0.0504 | 0 | 0 | 3.69 KB |
#5291 | ObjectExtractorMoreComplexBody |
net472 | 3.82μs | 2.73ns | 10.6ns | 0.602 | 0.00572 | 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 | 32.2μs | 12.5ns | 46.6ns | 0.388 | 0 | 0 | 27.94 KB |
master | EncodeArgs |
netcoreapp3.1 | 47.1μs | 35.5ns | 133ns | 0.375 | 0 | 0 | 27.94 KB |
master | EncodeArgs |
net472 | 60μs | 40.3ns | 156ns | 4.43 | 0.0602 | 0 | 28.03 KB |
master | EncodeLegacyArgs |
net6.0 | 97.8μs | 116ns | 401ns | 0.425 | 0 | 0 | 30.34 KB |
master | EncodeLegacyArgs |
netcoreapp3.1 | 127μs | 439ns | 1.58μs | 0.306 | 0 | 0 | 30.34 KB |
master | EncodeLegacyArgs |
net472 | 179μs | 100ns | 387ns | 4.82 | 0.357 | 0 | 30.44 KB |
#5291 | EncodeArgs |
net6.0 | 33.1μs | 17.2ns | 66.5ns | 0.395 | 0 | 0 | 27.94 KB |
#5291 | EncodeArgs |
netcoreapp3.1 | 46.3μs | 21.4ns | 83ns | 0.368 | 0 | 0 | 27.94 KB |
#5291 | EncodeArgs |
net472 | 59.4μs | 25.7ns | 96.2ns | 4.43 | 0.0595 | 0 | 28.03 KB |
#5291 | EncodeLegacyArgs |
net6.0 | 102μs | 380ns | 1.42μs | 0.407 | 0.0509 | 0 | 30.34 KB |
#5291 | EncodeLegacyArgs |
netcoreapp3.1 | 128μs | 614ns | 2.38μs | 0.433 | 0 | 0 | 30.34 KB |
#5291 | EncodeLegacyArgs |
net472 | 183μs | 115ns | 430ns | 4.83 | 0.358 | 0 | 30.44 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunWafRealisticBenchmark |
net6.0 | 192μs | 406ns | 1.57μs | 0.095 | 0 | 0 | 6.51 KB |
master | RunWafRealisticBenchmark |
netcoreapp3.1 | 204μs | 313ns | 1.21μs | 0 | 0 | 0 | 6.49 KB |
master | RunWafRealisticBenchmark |
net472 | 224μs | 150ns | 582ns | 1 | 0 | 0 | 6.59 KB |
master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 127μs | 67.1ns | 251ns | 0 | 0 | 0 | 4.15 KB |
master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 136μs | 226ns | 874ns | 0 | 0 | 0 | 4.14 KB |
master | RunWafRealisticBenchmarkWithAttack |
net472 | 148μs | 48.2ns | 187ns | 0.666 | 0 | 0 | 4.19 KB |
#5291 | RunWafRealisticBenchmark |
net6.0 | 190μs | 115ns | 446ns | 0 | 0 | 0 | 6.51 KB |
#5291 | RunWafRealisticBenchmark |
netcoreapp3.1 | 202μs | 224ns | 866ns | 0 | 0 | 0 | 6.49 KB |
#5291 | RunWafRealisticBenchmark |
net472 | 227μs | 56.1ns | 210ns | 1.02 | 0 | 0 | 6.59 KB |
#5291 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 127μs | 199ns | 772ns | 0 | 0 | 0 | 4.15 KB |
#5291 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 134μs | 245ns | 950ns | 0 | 0 | 0 | 4.15 KB |
#5291 | RunWafRealisticBenchmarkWithAttack |
net472 | 147μs | 54.7ns | 205ns | 0.662 | 0 | 0 | 4.19 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 | 168μs | 111ns | 431ns | 0.168 | 0 | 0 | 18.3 KB |
master | SendRequest |
netcoreapp3.1 | 193μs | 297ns | 1.15μs | 0.193 | 0 | 0 | 20.46 KB |
master | SendRequest |
net472 | 0.00116ns | 0.000408ns | 0.00158ns | 0 | 0 | 0 | 0 b |
#5291 | SendRequest |
net6.0 | 172μs | 149ns | 576ns | 0.172 | 0 | 0 | 18.32 KB |
#5291 | SendRequest |
netcoreapp3.1 | 192μs | 329ns | 1.28μs | 0.189 | 0 | 0 | 20.46 KB |
#5291 | SendRequest |
net472 | 0.000499ns | 0.000199ns | 0.00069ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #5291
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.7 KB
42.05 KB
351 B
0.84%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.36 KB
41.61 KB
250 B
0.60%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.7 KB | 42.05 KB | 351 B | 0.84% |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.36 KB | 41.61 KB | 250 B | 0.60% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 549μs | 783ns | 3.03μs | 0.571 | 0 | 0 | 41.36 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 665μs | 1.24μs | 4.62μs | 0.331 | 0 | 0 | 41.7 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 835μs | 2.56μs | 9.9μs | 8.33 | 2.5 | 0.417 | 53.25 KB |
#5291 | WriteAndFlushEnrichedTraces |
net6.0 | 544μs | 2.33μs | 9.04μs | 0.561 | 0 | 0 | 41.61 KB |
#5291 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 652μs | 497ns | 1.72μs | 0.322 | 0 | 0 | 42.05 KB |
#5291 | WriteAndFlushEnrichedTraces |
net472 | 855μs | 4.07μs | 17.3μs | 8.19 | 2.59 | 0.431 | 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.18μs | 0.701ns | 2.71ns | 0.0107 | 0 | 0 | 776 B |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.57μs | 0.796ns | 3.08ns | 0.0102 | 0 | 0 | 776 B |
master | ExecuteNonQuery |
net472 | 1.72μs | 1.35ns | 4.67ns | 0.117 | 0 | 0 | 738 B |
#5291 | ExecuteNonQuery |
net6.0 | 1.13μs | 2.89ns | 11.2ns | 0.0105 | 0 | 0 | 776 B |
#5291 | ExecuteNonQuery |
netcoreapp3.1 | 1.53μs | 0.663ns | 2.57ns | 0.0108 | 0 | 0 | 776 B |
#5291 | ExecuteNonQuery |
net472 | 1.87μs | 3.89ns | 15.1ns | 0.117 | 0 | 0 | 738 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.29μs | 0.966ns | 3.74ns | 0.0141 | 0 | 0 | 1 KB |
master | CallElasticsearch |
netcoreapp3.1 | 1.61μs | 1.21ns | 4.68ns | 0.013 | 0 | 0 | 1 KB |
master | CallElasticsearch |
net472 | 2.43μs | 1.2ns | 4.47ns | 0.16 | 0 | 0 | 1.01 KB |
master | CallElasticsearchAsync |
net6.0 | 1.25μs | 0.744ns | 2.88ns | 0.0137 | 0 | 0 | 976 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.67μs | 0.8ns | 2.99ns | 0.014 | 0 | 0 | 1.05 KB |
master | CallElasticsearchAsync |
net472 | 2.69μs | 2.08ns | 8.04ns | 0.169 | 0 | 0 | 1.07 KB |
#5291 | CallElasticsearch |
net6.0 | 1.2μs | 0.288ns | 1.08ns | 0.0138 | 0 | 0 | 1 KB |
#5291 | CallElasticsearch |
netcoreapp3.1 | 1.63μs | 0.394ns | 1.42ns | 0.0131 | 0 | 0 | 1 KB |
#5291 | CallElasticsearch |
net472 | 2.36μs | 1.63ns | 6.3ns | 0.16 | 0 | 0 | 1.01 KB |
#5291 | CallElasticsearchAsync |
net6.0 | 1.32μs | 0.996ns | 3.86ns | 0.0138 | 0 | 0 | 976 B |
#5291 | CallElasticsearchAsync |
netcoreapp3.1 | 1.62μs | 1.12ns | 4.32ns | 0.0146 | 0 | 0 | 1.05 KB |
#5291 | CallElasticsearchAsync |
net472 | 2.63μs | 1.85ns | 7.17ns | 0.169 | 0 | 0 | 1.07 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.42μs | 1.39ns | 5.19ns | 0.0129 | 0 | 0 | 920 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.69μs | 0.671ns | 2.51ns | 0.0126 | 0 | 0 | 920 B |
master | ExecuteAsync |
net472 | 1.84μs | 0.717ns | 2.78ns | 0.139 | 0 | 0 | 883 B |
#5291 | ExecuteAsync |
net6.0 | 1.39μs | 0.941ns | 3.52ns | 0.0133 | 0 | 0 | 920 B |
#5291 | ExecuteAsync |
netcoreapp3.1 | 1.66μs | 0.58ns | 2.17ns | 0.0125 | 0 | 0 | 920 B |
#5291 | ExecuteAsync |
net472 | 1.85μs | 1.15ns | 4.45ns | 0.139 | 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.22μs | 1.85ns | 6.92ns | 0.0295 | 0 | 0 | 2.15 KB |
master | SendAsync |
netcoreapp3.1 | 5.06μs | 9.74ns | 37.7ns | 0.0351 | 0 | 0 | 2.69 KB |
master | SendAsync |
net472 | 7.72μs | 4.7ns | 18.2ns | 0.535 | 0 | 0 | 3.37 KB |
#5291 | SendAsync |
net6.0 | 4.31μs | 2.08ns | 7.78ns | 0.03 | 0 | 0 | 2.15 KB |
#5291 | SendAsync |
netcoreapp3.1 | 5.04μs | 3.13ns | 12.1ns | 0.0354 | 0 | 0 | 2.69 KB |
#5291 | SendAsync |
net472 | 7.87μs | 3.9ns | 14.6ns | 0.535 | 0 | 0 | 3.37 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 63.5μs | 723ns | 7.19μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 52.8μs | 258ns | 1.03μs | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 37.5μs | 71.1ns | 256ns | 0 | 0 | 0 | 62.09 KB |
master | StringConcatAspectBenchmark |
net6.0 | 267μs | 687ns | 3.83μs | 0 | 0 | 0 | 214.24 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 294μs | 1.57μs | 8.59μs | 0 | 0 | 0 | 203.31 KB |
master | StringConcatAspectBenchmark |
net472 | 252μs | 3.62μs | 34.7μs | 0 | 0 | 0 | 221.18 KB |
#5291 | StringConcatBenchmark |
net6.0 | 60.2μs | 695ns | 6.81μs | 0 | 0 | 0 | 43.44 KB |
#5291 | StringConcatBenchmark |
netcoreapp3.1 | 54.4μs | 243ns | 877ns | 0 | 0 | 0 | 42.64 KB |
#5291 | StringConcatBenchmark |
net472 | 38.4μs | 113ns | 409ns | 0 | 0 | 0 | 61.87 KB |
#5291 | StringConcatAspectBenchmark |
net6.0 | 275μs | 1.06μs | 6.62μs | 0 | 0 | 0 | 214.44 KB |
#5291 | StringConcatAspectBenchmark |
netcoreapp3.1 | 281μs | 1.5μs | 8.36μs | 0 | 0 | 0 | 203.13 KB |
#5291 | StringConcatAspectBenchmark |
net472 | 254μs | 4.11μs | 39.4μ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.42μs | 0.538ns | 1.86ns | 0.0228 | 0 | 0 | 1.63 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.28μs | 0.707ns | 2.55ns | 0.0218 | 0 | 0 | 1.63 KB |
master | EnrichedLog |
net472 | 2.69μs | 0.949ns | 3.67ns | 0.247 | 0 | 0 | 1.56 KB |
#5291 | EnrichedLog |
net6.0 | 1.47μs | 0.792ns | 2.96ns | 0.0229 | 0 | 0 | 1.63 KB |
#5291 | EnrichedLog |
netcoreapp3.1 | 2.29μs | 1.5ns | 5.62ns | 0.0216 | 0 | 0 | 1.63 KB |
#5291 | EnrichedLog |
net472 | 2.6μs | 2.49ns | 9.31ns | 0.247 | 0 | 0 | 1.56 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 | 113ns | 439ns | 0.0563 | 0 | 0 | 4.22 KB |
master | EnrichedLog |
netcoreapp3.1 | 119μs | 135ns | 525ns | 0 | 0 | 0 | 4.22 KB |
master | EnrichedLog |
net472 | 146μs | 114ns | 443ns | 0.657 | 0.219 | 0 | 4.4 KB |
#5291 | EnrichedLog |
net6.0 | 113μs | 89ns | 345ns | 0 | 0 | 0 | 4.22 KB |
#5291 | EnrichedLog |
netcoreapp3.1 | 118μs | 84.1ns | 326ns | 0.0588 | 0 | 0 | 4.22 KB |
#5291 | EnrichedLog |
net472 | 148μs | 92.3ns | 357ns | 0.663 | 0.221 | 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 | 2.9μs | 1.4ns | 5.23ns | 0.0304 | 0 | 0 | 2.19 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.29μs | 1.73ns | 6.49ns | 0.0278 | 0 | 0 | 2.19 KB |
master | EnrichedLog |
net472 | 4.79μs | 1.23ns | 4.77ns | 0.317 | 0 | 0 | 2.01 KB |
#5291 | EnrichedLog |
net6.0 | 3.04μs | 0.918ns | 3.44ns | 0.0305 | 0 | 0 | 2.19 KB |
#5291 | EnrichedLog |
netcoreapp3.1 | 4.08μs | 2.18ns | 8.15ns | 0.0285 | 0 | 0 | 2.19 KB |
#5291 | EnrichedLog |
net472 | 4.79μs | 1.1ns | 4.27ns | 0.318 | 0 | 0 | 2.01 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.35μs | 1.47ns | 5.5ns | 0.0163 | 0 | 0 | 1.17 KB |
master | SendReceive |
netcoreapp3.1 | 1.69μs | 0.985ns | 3.82ns | 0.0161 | 0 | 0 | 1.17 KB |
master | SendReceive |
net472 | 2.28μs | 0.835ns | 3.24ns | 0.185 | 0 | 0 | 1.17 KB |
#5291 | SendReceive |
net6.0 | 1.39μs | 1.03ns | 3.72ns | 0.0165 | 0 | 0 | 1.17 KB |
#5291 | SendReceive |
netcoreapp3.1 | 1.8μs | 0.656ns | 2.45ns | 0.0153 | 0 | 0 | 1.17 KB |
#5291 | SendReceive |
net472 | 2.23μs | 1.03ns | 3.86ns | 0.185 | 0 | 0 | 1.17 KB |
Benchmarks.Trace.SerilogBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #5291
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net6.0
1.158
3,089.32
2,666.92
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net6.0 | 1.158 | 3,089.32 | 2,666.92 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 3.04μs | 17.6ns | 138ns | 0.021 | 0 | 0 | 1.54 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.86μs | 2.43ns | 9.4ns | 0.0216 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
net472 | 4.27μs | 2.18ns | 8.43ns | 0.312 | 0 | 0 | 1.97 KB |
#5291 | EnrichedLog |
net6.0 | 2.67μs | 0.782ns | 2.93ns | 0.0213 | 0 | 0 | 1.54 KB |
#5291 | EnrichedLog |
netcoreapp3.1 | 3.96μs | 3.18ns | 12.3ns | 0.0197 | 0 | 0 | 1.58 KB |
#5291 | EnrichedLog |
net472 | 4.26μs | 1.61ns | 6.25ns | 0.312 | 0 | 0 | 1.97 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 | 463ns | 0.162ns | 0.605ns | 0.00772 | 0 | 0 | 544 B |
master | StartFinishSpan |
netcoreapp3.1 | 721ns | 0.327ns | 1.22ns | 0.00719 | 0 | 0 | 544 B |
master | StartFinishSpan |
net472 | 720ns | 0.274ns | 1.06ns | 0.0865 | 0 | 0 | 546 B |
master | StartFinishScope |
net6.0 | 629ns | 0.824ns | 3.19ns | 0.00917 | 0 | 0 | 664 B |
master | StartFinishScope |
netcoreapp3.1 | 868ns | 0.298ns | 1.11ns | 0.00889 | 0 | 0 | 664 B |
master | StartFinishScope |
net472 | 927ns | 0.253ns | 0.98ns | 0.0992 | 0 | 0 | 626 B |
#5291 | StartFinishSpan |
net6.0 | 448ns | 0.115ns | 0.43ns | 0.00758 | 0 | 0 | 544 B |
#5291 | StartFinishSpan |
netcoreapp3.1 | 688ns | 0.273ns | 1.02ns | 0.00744 | 0 | 0 | 544 B |
#5291 | StartFinishSpan |
net472 | 777ns | 0.373ns | 1.45ns | 0.0867 | 0 | 0 | 546 B |
#5291 | StartFinishScope |
net6.0 | 593ns | 0.242ns | 0.936ns | 0.00917 | 0 | 0 | 664 B |
#5291 | StartFinishScope |
netcoreapp3.1 | 831ns | 0.433ns | 1.62ns | 0.00894 | 0 | 0 | 664 B |
#5291 | StartFinishScope |
net472 | 934ns | 1.91ns | 7.39ns | 0.0991 | 0 | 0 | 626 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 | 651ns | 0.539ns | 2.09ns | 0.00914 | 0 | 0 | 664 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 946ns | 1.51ns | 5.66ns | 0.00881 | 0 | 0 | 664 B |
master | RunOnMethodBegin |
net472 | 1.1μs | 0.429ns | 1.6ns | 0.0994 | 0 | 0 | 626 B |
#5291 | RunOnMethodBegin |
net6.0 | 691ns | 0.179ns | 0.692ns | 0.00925 | 0 | 0 | 664 B |
#5291 | RunOnMethodBegin |
netcoreapp3.1 | 905ns | 0.746ns | 2.89ns | 0.00907 | 0 | 0 | 664 B |
#5291 | RunOnMethodBegin |
net472 | 1.15μs | 0.627ns | 2.43ns | 0.0991 | 0 | 0 | 626 B |
Summary of changes
Adds a try-catch to
SetExceptionTags()
Reason for change
We've seen cases where calling
ToString()
on the Exception throwsImplementation details
Add a try-catch
Test coverage
Do we need tests for this? 😇
Other details