Conversation
andrewlock
left a comment
There was a problem hiding this comment.
It makes me so sad we have to handle this. HttpContext.Response is non-null by definition 🙁
tracer/src/Datadog.Trace/DiagnosticListeners/AspNetCoreDiagnosticObserver.cs
Show resolved
Hide resolved
Yeah I'm not sure exactly how this comes about? Should we opt to accept a level of exceptions here as it was quite low volume? |
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7720 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 - Unknown 🤷 Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower
|
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.456 | 298,308.56 | 732,580.18 | |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.098 | 410,525.21 | 861,199.17 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 396μs | 64.5ns | 250ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 410μs | 67.3ns | 252ns | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 431μs | 34.7ns | 125ns | 0 | 0 | 0 | 4.68 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 288μs | 48.4ns | 175ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 298μs | 163ns | 610ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 314μs | 27.5ns | 99.2ns | 0 | 0 | 0 | 2.29 KB |
| #7720 | RunWafRealisticBenchmark |
net6.0 | 392μs | 79ns | 306ns | 0 | 0 | 0 | 4.56 KB |
| #7720 | RunWafRealisticBenchmark |
netcoreapp3.1 | 857μs | 4.15μs | 16.6μs | 0 | 0 | 0 | 4.48 KB |
| #7720 | RunWafRealisticBenchmark |
net472 | 428μs | 47.9ns | 179ns | 0 | 0 | 0 | 4.66 KB |
| #7720 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 284μs | 89.7ns | 347ns | 0 | 0 | 0 | 2.24 KB |
| #7720 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 724μs | 5.66μs | 53.1μs | 0 | 0 | 0 | 2.22 KB |
| #7720 | RunWafRealisticBenchmarkWithAttack |
net472 | 309μs | 44.3ns | 172ns | 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 | 61μs | 63.7ns | 229ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.9μs | 65ns | 243ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.000221ns | 0.000221ns | 0.000858ns | 0 | 0 | 0 | 0 b |
| #7720 | SendRequest |
net6.0 | 60.9μs | 86.5ns | 324ns | 0 | 0 | 0 | 14.52 KB |
| #7720 | SendRequest |
netcoreapp3.1 | 72.5μs | 264ns | 1.12μs | 0 | 0 | 0 | 17.42 KB |
| #7720 | SendRequest |
net472 | 0.00615ns | 0.00218ns | 0.00843ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7720
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
6 B
7 B
1 B
16.67%
Fewer allocations 🎉 in #7720
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
5 B
4 B
-1 B
-20.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
73 B
0 b
-73 B
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
48 B
0 b
-48 B
-100.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 6 B | 7 B | 1 B | 16.67% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 5 B | 4 B | -1 B | -20.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 73 B | 0 b | -73 B | -100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 48 B | 0 b | -48 B | -100.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.93ms | 2.64μs | 10.2μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.28ms | 11.6μs | 53.3μs | 0 | 0 | 0 | 640.09 KB |
| master | OriginalCharSlice |
net472 | 2.63ms | 703ns | 2.54μs | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.41ms | 104ns | 403ns | 0 | 0 | 0 | 6 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.75ms | 479ns | 1.85μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.94ms | 270ns | 1.04μs | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 875μs | 116ns | 450ns | 0 | 0 | 0 | 5 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 798μs | 124ns | 480ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.13ms | 102ns | 397ns | 0 | 0 | 0 | 48 B |
| #7720 | OriginalCharSlice |
net6.0 | 1.93ms | 304ns | 1.18μs | 0 | 0 | 0 | 640.01 KB |
| #7720 | OriginalCharSlice |
netcoreapp3.1 | 2.08ms | 5.51μs | 21.3μs | 0 | 0 | 0 | 640 KB |
| #7720 | OriginalCharSlice |
net472 | 2.76ms | 392ns | 1.41μs | 100 | 0 | 0 | 641.95 KB |
| #7720 | OptimizedCharSlice |
net6.0 | 1.36ms | 387ns | 1.5μs | 0 | 0 | 0 | 7 B |
| #7720 | OptimizedCharSlice |
netcoreapp3.1 | 1.72ms | 128ns | 463ns | 0 | 0 | 0 | 1 B |
| #7720 | OptimizedCharSlice |
net472 | 1.97ms | 250ns | 969ns | 0 | 0 | 0 | 0 b |
| #7720 | OptimizedCharSliceWithPool |
net6.0 | 874μs | 24.5ns | 91.7ns | 0 | 0 | 0 | 4 B |
| #7720 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 851μs | 32.3ns | 125ns | 0 | 0 | 0 | 0 b |
| #7720 | OptimizedCharSliceWithPool |
net472 | 1.16ms | 128ns | 494ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7720
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
42.6 KB
41.8 KB
-800 B
-1.88%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 42.6 KB | 41.8 KB | -800 B | -1.88% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 665μs | 2.63μs | 9.85μs | 0 | 0 | 0 | 42.6 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 640μs | 2.96μs | 10.7μs | 0 | 0 | 0 | 41.96 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 978μs | 4.14μs | 16μs | 8.33 | 0 | 0 | 56.56 KB |
| #7720 | WriteAndFlushEnrichedTraces |
net6.0 | 741μs | 3.16μs | 11.8μs | 0 | 0 | 0 | 41.8 KB |
| #7720 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 709μs | 2.87μs | 11.1μs | 0 | 0 | 0 | 41.89 KB |
| #7720 | WriteAndFlushEnrichedTraces |
net472 | 939μs | 4.62μs | 19.6μs | 8.93 | 4.46 | 0 | 56.61 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.83μs | 9.13ns | 38.7ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.6μs | 8.02ns | 31ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.88μs | 4.02ns | 16.1ns | 0.143 | 0.0143 | 0 | 987 B |
| #7720 | ExecuteNonQuery |
net6.0 | 1.96μs | 8.04ns | 30.1ns | 0 | 0 | 0 | 1.02 KB |
| #7720 | ExecuteNonQuery |
netcoreapp3.1 | 2.66μs | 6.47ns | 25.1ns | 0 | 0 | 0 | 1.02 KB |
| #7720 | ExecuteNonQuery |
net472 | 2.83μs | 2.55ns | 9.2ns | 0.156 | 0.0142 | 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.67μs | 7.01ns | 26.2ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.21μs | 10.3ns | 41.2ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.65μs | 1.73ns | 6.69ns | 0.164 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.86μs | 8.41ns | 31.5ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.34μs | 10.7ns | 41.5ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.85μs | 5.9ns | 22.9ns | 0.171 | 0 | 0 | 1.1 KB |
| #7720 | CallElasticsearch |
net6.0 | 1.73μs | 5.96ns | 23.1ns | 0 | 0 | 0 | 1.03 KB |
| #7720 | CallElasticsearch |
netcoreapp3.1 | 2.19μs | 10.9ns | 44.9ns | 0 | 0 | 0 | 1.03 KB |
| #7720 | CallElasticsearch |
net472 | 3.62μs | 5.98ns | 23.2ns | 0.163 | 0 | 0 | 1.04 KB |
| #7720 | CallElasticsearchAsync |
net6.0 | 1.88μs | 5.28ns | 19ns | 0 | 0 | 0 | 1.01 KB |
| #7720 | CallElasticsearchAsync |
netcoreapp3.1 | 2.36μs | 11ns | 43.9ns | 0 | 0 | 0 | 1.08 KB |
| #7720 | CallElasticsearchAsync |
net472 | 3.69μs | 6.74ns | 26.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.84μs | 6.75ns | 24.4ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.5μs | 8.39ns | 32.5ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.62μs | 5.25ns | 20.4ns | 0.143 | 0 | 0 | 915 B |
| #7720 | ExecuteAsync |
net6.0 | 1.85μs | 1.68ns | 5.81ns | 0 | 0 | 0 | 952 B |
| #7720 | ExecuteAsync |
netcoreapp3.1 | 2.54μs | 4.61ns | 17.9ns | 0 | 0 | 0 | 952 B |
| #7720 | ExecuteAsync |
net472 | 2.63μs | 6.18ns | 23.9ns | 0.143 | 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 | 7.06μs | 16.7ns | 62.4ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.43μs | 6.39ns | 23ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.3μs | 13.9ns | 53.6ns | 0.491 | 0 | 0 | 3.18 KB |
| #7720 | SendAsync |
net6.0 | 6.85μs | 24.5ns | 95ns | 0 | 0 | 0 | 2.36 KB |
| #7720 | SendAsync |
netcoreapp3.1 | 8.65μs | 6.92ns | 26.8ns | 0 | 0 | 0 | 2.9 KB |
| #7720 | SendAsync |
net472 | 12.2μs | 11.6ns | 45.1ns | 0.487 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7720
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.44 KB
68.25 KB
24.81 KB
57.11%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
254.69 KB
276.17 KB
21.48 KB
8.43%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
278.53 KB
286.72 KB
8.19 KB
2.94%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
43.63 KB
44.13 KB
496 B
1.14%
Fewer allocations 🎉 in #7720
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
65.54 KB
57.34 KB
-8.19 KB
-12.50%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.44 KB | 68.25 KB | 24.81 KB | 57.11% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 254.69 KB | 276.17 KB | 21.48 KB | 8.43% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 278.53 KB | 286.72 KB | 8.19 KB | 2.94% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 43.63 KB | 44.13 KB | 496 B | 1.14% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 65.54 KB | 57.34 KB | -8.19 KB | -12.50% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 41.4μs | 164ns | 570ns | 0 | 0 | 0 | 43.44 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 49.1μs | 256ns | 1.17μs | 0 | 0 | 0 | 43.63 KB |
| master | StringConcatBenchmark |
net472 | 58.4μs | 270ns | 1.05μs | 0 | 0 | 0 | 65.54 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 501μs | 1.84μs | 7.37μs | 0 | 0 | 0 | 277.94 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 491μs | 1.67μs | 6.26μs | 0 | 0 | 0 | 254.69 KB |
| master | StringConcatAspectBenchmark |
net472 | 405μs | 2.17μs | 11.3μs | 0 | 0 | 0 | 278.53 KB |
| #7720 | StringConcatBenchmark |
net6.0 | 45μs | 263ns | 2.38μs | 0 | 0 | 0 | 68.25 KB |
| #7720 | StringConcatBenchmark |
netcoreapp3.1 | 56.1μs | 750ns | 7.39μs | 0 | 0 | 0 | 44.13 KB |
| #7720 | StringConcatBenchmark |
net472 | 57.6μs | 137ns | 492ns | 0 | 0 | 0 | 57.34 KB |
| #7720 | StringConcatAspectBenchmark |
net6.0 | 481μs | 1.96μs | 7.08μs | 0 | 0 | 0 | 276.98 KB |
| #7720 | StringConcatAspectBenchmark |
netcoreapp3.1 | 517μs | 1.73μs | 6.94μs | 0 | 0 | 0 | 276.17 KB |
| #7720 | StringConcatAspectBenchmark |
net472 | 395μs | 1.29μs | 4.47μs | 0 | 0 | 0 | 286.72 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.71μs | 12.6ns | 50.5ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.52μs | 15.8ns | 61.1ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.81μs | 2.01ns | 7.77ns | 0.247 | 0 | 0 | 1.64 KB |
| #7720 | EnrichedLog |
net6.0 | 2.72μs | 2.73ns | 10.6ns | 0 | 0 | 0 | 1.7 KB |
| #7720 | EnrichedLog |
netcoreapp3.1 | 3.68μs | 18.1ns | 80.8ns | 0 | 0 | 0 | 1.7 KB |
| #7720 | EnrichedLog |
net472 | 3.83μs | 3.15ns | 12.2ns | 0.249 | 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 | 129μs | 492ns | 1.84μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 130μs | 265ns | 954ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 168μs | 155ns | 581ns | 0 | 0 | 0 | 4.52 KB |
| #7720 | EnrichedLog |
net6.0 | 124μs | 102ns | 367ns | 0 | 0 | 0 | 4.31 KB |
| #7720 | EnrichedLog |
netcoreapp3.1 | 129μs | 406ns | 1.52μs | 0 | 0 | 0 | 4.31 KB |
| #7720 | EnrichedLog |
net472 | 170μs | 427ns | 1.65μs | 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 | 5.02μs | 17.4ns | 65.2ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.68μs | 13.5ns | 52.1ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.53μs | 5.43ns | 21ns | 0.299 | 0 | 0 | 2.08 KB |
| #7720 | EnrichedLog |
net6.0 | 5.11μs | 24.6ns | 95.3ns | 0 | 0 | 0 | 2.26 KB |
| #7720 | EnrichedLog |
netcoreapp3.1 | 7.02μs | 10.6ns | 41.1ns | 0 | 0 | 0 | 2.26 KB |
| #7720 | EnrichedLog |
net472 | 7.72μs | 4.87ns | 18.9ns | 0.308 | 0 | 0 | 2.08 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.95μs | 10.6ns | 54.1ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.62μs | 12.4ns | 52.6ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.02μs | 2.72ns | 10.5ns | 0.18 | 0 | 0 | 1.2 KB |
| #7720 | SendReceive |
net6.0 | 1.96μs | 1.78ns | 6.65ns | 0 | 0 | 0 | 1.2 KB |
| #7720 | SendReceive |
netcoreapp3.1 | 2.68μs | 3.76ns | 14.6ns | 0 | 0 | 0 | 1.2 KB |
| #7720 | SendReceive |
net472 | 2.97μs | 2.24ns | 8.68ns | 0.177 | 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.3μs | 7.02ns | 27.2ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.65μs | 17.4ns | 67.5ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.59μs | 7.7ns | 28.8ns | 0.295 | 0 | 0 | 2.03 KB |
| #7720 | EnrichedLog |
net6.0 | 4.4μs | 3.41ns | 13.2ns | 0 | 0 | 0 | 1.58 KB |
| #7720 | EnrichedLog |
netcoreapp3.1 | 5.66μs | 8.37ns | 32.4ns | 0 | 0 | 0 | 1.63 KB |
| #7720 | EnrichedLog |
net472 | 6.69μs | 9.17ns | 35.5ns | 0.299 | 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 | 768ns | 4ns | 19.6ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 953ns | 4.91ns | 24.1ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 947ns | 0.2ns | 0.72ns | 0.09 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 922ns | 0.233ns | 0.904ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.2μs | 4.69ns | 18.1ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.15μs | 0.245ns | 0.882ns | 0.103 | 0 | 0 | 658 B |
| #7720 | StartFinishSpan |
net6.0 | 773ns | 3.85ns | 17.2ns | 0 | 0 | 0 | 576 B |
| #7720 | StartFinishSpan |
netcoreapp3.1 | 964ns | 4.91ns | 23.5ns | 0 | 0 | 0 | 576 B |
| #7720 | StartFinishSpan |
net472 | 956ns | 0.12ns | 0.447ns | 0.0906 | 0 | 0 | 578 B |
| #7720 | StartFinishScope |
net6.0 | 930ns | 0.548ns | 2.12ns | 0 | 0 | 0 | 696 B |
| #7720 | StartFinishScope |
netcoreapp3.1 | 1.23μs | 6.13ns | 28.1ns | 0 | 0 | 0 | 696 B |
| #7720 | StartFinishScope |
net472 | 1.17μs | 0.194ns | 0.724ns | 0.099 | 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.04ns | 20.1ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.41μs | 6.88ns | 31.5ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.49μs | 0.871ns | 3.37ns | 0.104 | 0 | 0 | 658 B |
| #7720 | RunOnMethodBegin |
net6.0 | 1.07μs | 5.21ns | 20.9ns | 0 | 0 | 0 | 696 B |
| #7720 | RunOnMethodBegin |
netcoreapp3.1 | 1.4μs | 6.63ns | 25.7ns | 0 | 0 | 0 | 696 B |
| #7720 | RunOnMethodBegin |
net472 | 1.49μs | 0.568ns | 2.2ns | 0.104 | 0 | 0 | 658 B |
3bf408c to
8b9913e
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7720) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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 highlighted 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). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7720) - mean (76ms) : 73, 79
master - mean (73ms) : 70, 76
section Bailout
This PR (7720) - mean (80ms) : 78, 82
master - mean (76ms) : 75, 78
section CallTarget+Inlining+NGEN
This PR (7720) - mean (1,111ms) : 1064, 1157
master - mean (1,098ms) : 1039, 1157
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7720) - mean (119ms) : 114, 124
master - mean (119ms) : 116, 123
section Bailout
This PR (7720) - mean (121ms) : 118, 125
master - mean (121ms) : 117, 125
section CallTarget+Inlining+NGEN
This PR (7720) - mean (812ms) : 791, 833
master - mean (818ms) : 795, 841
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7720) - mean (106ms) : 102, 109
master - mean (106ms) : 103, 110
section Bailout
This PR (7720) - mean (107ms) : 104, 110
master - mean (107ms) : 105, 109
section CallTarget+Inlining+NGEN
This PR (7720) - mean (953ms) : 918, 988
master - mean (956ms) : 918, 993
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7720) - mean (104ms) : 100, 108
master - mean (104ms) : 101, 107
section Bailout
This PR (7720) - mean (105ms) : 103, 107
master - mean (105ms) : 103, 107
section CallTarget+Inlining+NGEN
This PR (7720) - mean (840ms) : 806, 874
master - mean (836ms) : 801, 870
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7720) - mean (215ms) : 211, 219
master - mean (214ms) : 207, 220
section Bailout
This PR (7720) - mean (219ms) : 215, 223
master - mean (218ms) : 212, 223
section CallTarget+Inlining+NGEN
This PR (7720) - mean (1,250ms) : 1203, 1298
master - mean (1,226ms) : 1164, 1287
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7720) - mean (311ms) : 301, 321
master - mean (302ms) : 293, 311
section Bailout
This PR (7720) - mean (315ms) : 308, 323
master - mean (303ms) : 297, 309
section CallTarget+Inlining+NGEN
This PR (7720) - mean (1,023ms) : 999, 1048
master - mean (999ms) : 974, 1024
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7720) - mean (306ms) : 300, 312
master - mean (293ms) : 285, 301
section Bailout
This PR (7720) - mean (306ms) : 298, 315
master - mean (291ms) : 284, 299
section CallTarget+Inlining+NGEN
This PR (7720) - mean (1,195ms) : 1155, 1236
master - mean (1,179ms) : 1140, 1219
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7720) - mean (302ms) : 294, 311
master - mean (298ms) : 290, 306
section Bailout
This PR (7720) - mean (306ms) : 298, 314
master - mean (297ms) : 291, 304
section CallTarget+Inlining+NGEN
This PR (7720) - mean (1,130ms) : 1001, 1258
master - mean (1,080ms) : 994, 1166
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Summary of changes
Saw a couple of of
NullReferenceExceptionfrom calling things inHttpContext.Response.so checking ifResponseis notnullReason for change
Implementation details
Added some null checks / protections
Test coverage
Looked at
dd-trace-dotnet/tracer/test/Datadog.Trace.Tests/PlatformHelpers/AspNetCoreHttpRequestHandlerTests.cs
Line 15 in 5f33ec0
Other details