Closed andrewlock closed 1 day ago
Branch report: andrew/add-duck-type-checks
Commit report: d00d4dc
Test service: dd-trace-dotnet
:white_check_mark: 0 Failed, 424684 Passed, 3280 Skipped, 35h 9m 7.21s Total Time :hourglass: 4 Performance Regressions
ObjectExtractorMoreComplexBody
- Benchmarks.Trace.Asm.AppSecBodyBenchmark
4.5µs (+676ns, +18%) - DetailsCallTarget+Inlining+NGEN
- Samples.FakeDbCommand.windows.net462.json.scenarios
1.02s (+31.12ms, +3%) - DetailsCallTarget+Inlining+NGEN
- Samples.FakeDbCommand.windows.netcoreapp31.json.scenarios
720.31ms (+26.16ms, +4%) - DetailsBaseline_garbagecollections
- scenarios
1.08s (+75.72ms, +8%) - DetailsExecution-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 (5742) - mean (74ms) : 64, 84
. : milestone, 74,
master - mean (74ms) : 65, 83
. : milestone, 74,
section CallTarget+Inlining+NGEN
This PR (5742) - mean (1,020ms) : 998, 1043
. : milestone, 1020,
master - mean (991ms) : 973, 1009
. : milestone, 991,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5742) - mean (110ms) : 106, 113
. : milestone, 110,
master - mean (110ms) : 107, 113
. : milestone, 110,
section CallTarget+Inlining+NGEN
This PR (5742) - mean (720ms) : 701, 740
. : milestone, 720,
master - mean (698ms) : 675, 722
. : milestone, 698,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5742) - mean (94ms) : 90, 99
. : milestone, 94,
master - mean (93ms) : 90, 96
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (5742) - mean (671ms) : 637, 705
. : milestone, 671,
master - mean (657ms) : 630, 683
. : milestone, 657,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5742) - mean (193ms) : 188, 198
. : milestone, 193,
master - mean (192ms) : 188, 196
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (5742) - mean (1,107ms) : 1081, 1133
. : milestone, 1107,
master - mean (1,081ms) : 1059, 1103
. : milestone, 1081,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5742) - mean (278ms) : 274, 282
. : milestone, 278,
master - mean (276ms) : 271, 281
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (5742) - mean (896ms) : 872, 921
. : milestone, 896,
master - mean (874ms) : 849, 899
. : milestone, 874,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5742) - mean (265ms) : 261, 270
. : milestone, 265,
master - mean (269ms) : 263, 275
. : milestone, 269,
section CallTarget+Inlining+NGEN
This PR (5742) - mean (876ms) : 847, 904
. : milestone, 876,
master - mean (867ms) : 839, 894
. : milestone, 867,
Benchmarks for #5742 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored.
Benchmarks for #5742 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored.
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 (5742) (11.771M) : 0, 11771083
master (11.753M) : 0, 11753412
benchmarks/2.9.0 (11.542M) : 0, 11542126
section Automatic
This PR (5742) (8.123M) : 0, 8123367
master (7.853M) : 0, 7853279
benchmarks/2.9.0 (8.263M) : 0, 8262905
section Trace stats
master (8.259M) : 0, 8258966
section Manual
master (9.899M) : 0, 9899401
section Manual + Automatic
This PR (5742) (7.441M) : 0, 7440994
master (7.433M) : 0, 7432897
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5742) (9.447M) : 0, 9446866
master (9.574M) : 0, 9574121
benchmarks/2.9.0 (9.596M) : 0, 9596140
section Automatic
This PR (5742) (6.712M) : 0, 6712063
master (6.671M) : 0, 6671192
section Trace stats
master (6.990M) : 0, 6990244
section Manual
master (8.307M) : 0, 8306500
section Manual + Automatic
This PR (5742) (6.241M) : 0, 6240534
master (6.251M) : 0, 6250704
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5742) (9.911M) : 0, 9911223
master (10.202M) : 0, 10201759
benchmarks/2.9.0 (10.213M) : 0, 10213239
section Automatic
This PR (5742) (6.924M) : 0, 6923985
master (7.212M) : 0, 7212394
benchmarks/2.9.0 (7.482M) : 0, 7482023
section Trace stats
master (7.549M) : 0, 7549360
section Manual
master (9.013M) : 0, 9012822
section Manual + Automatic
This PR (5742) (6.551M) : crit ,0, 6551045
master (7.018M) : 0, 7017920
Summary of changes
Reason for change
We need to be very careful we don't break duck types for our Datadog.Trace.Manual API when evolving Datadog.Trace. We have integration tests for this already, so this is just an extra layer of defense to make sure we don't change things without realizing the consequences.
Additionally, the proxy type annotations are required as part of the Native AOT work, so the attributes are based on work already started by @kevingosse in a branch: https://github.com/DataDog/dd-trace-dotnet/commit/a41cf637efd334c722b1c6e22f89b320609b3ebf
Implementation details
[DuckType]
attribute, added to proxies to indicate the types they are designed to target[DuckCopy]
for same purpose (I added this because it's what Kevin did, but maybe we should just stick to[DuckType]
, and have you add both?)Datadog.Trace.Scope
and then duck types that to a Datadog.Trace.ManualIScope
IScope
. Made the interfaces partial to work around it for now, but we can probably simplify this down the lineTest coverage
Adds extra coverage
Other details
One oddity, is that I couldn't seem to
DuckCast
IScope
toIScope
🤔 The duck typing complains about the missing (inherited) membervoid Dispose()
. Ignored it for now, as in practice we're always (currently) duck typing aScope
which does work, but we may need to look into it again later