Skip to content
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

Actually include child processes when requested during a memory dump in tests #6520

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

andrewlock
Copy link
Member

Summary of changes

Fix "dump child processes" not working

Reason for change

#6401 added the ability to say "dump the child processes too", except we didn't wire up the parameter.

Implementation details

Wire up the parameter

@andrewlock andrewlock added the area:tests unit tests, integration tests label Jan 9, 2025
@andrewlock andrewlock requested a review from a team as a code owner January 9, 2025 10:15
@andrewlock andrewlock changed the title _Actually_ include child processes when requested during a memory dump in tests Actually include child processes when requested during a memory dump in tests Jan 9, 2025
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jan 9, 2025

Datadog Report

Branch report: andrew/actually-dump-children
Commit report: 732dcef
Test service: dd-trace-dotnet

✅ 0 Failed, 239406 Passed, 2089 Skipped, 19h 6m 24.96s Total Time

@andrewlock
Copy link
Member Author

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:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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 (6520) - mean (69ms)  : 65, 72
     .   : milestone, 69,
    master - mean (69ms)  : 66, 72
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6520) - mean (981ms)  : 957, 1004
     .   : milestone, 981,
    master - mean (978ms)  : 957, 998
     .   : milestone, 978,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6520) - mean (107ms)  : 105, 109
     .   : milestone, 107,
    master - mean (108ms)  : 106, 110
     .   : milestone, 108,

    section CallTarget+Inlining+NGEN
    This PR (6520) - mean (680ms)  : 662, 698
     .   : milestone, 680,
    master - mean (678ms)  : 666, 690
     .   : milestone, 678,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6520) - mean (91ms)  : 90, 93
     .   : milestone, 91,
    master - mean (91ms)  : 89, 93
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (6520) - mean (638ms)  : 620, 655
     .   : milestone, 638,
    master - mean (635ms)  : 619, 651
     .   : milestone, 635,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6520) - mean (195ms)  : 189, 200
     .   : milestone, 195,
    master - mean (194ms)  : 189, 198
     .   : milestone, 194,

    section CallTarget+Inlining+NGEN
    This PR (6520) - mean (1,108ms)  : 1078, 1138
     .   : milestone, 1108,
    master - mean (1,107ms)  : 1071, 1143
     .   : milestone, 1107,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6520) - mean (280ms)  : 276, 285
     .   : milestone, 280,
    master - mean (280ms)  : 276, 284
     .   : milestone, 280,

    section CallTarget+Inlining+NGEN
    This PR (6520) - mean (873ms)  : 847, 900
     .   : milestone, 873,
    master - mean (871ms)  : 842, 900
     .   : milestone, 871,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6520) - mean (267ms)  : 263, 272
     .   : milestone, 267,
    master - mean (267ms)  : 263, 270
     .   : milestone, 267,

    section CallTarget+Inlining+NGEN
    This PR (6520) - mean (851ms)  : 817, 885
     .   : milestone, 851,
    master - mean (852ms)  : 819, 886
     .   : milestone, 852,

Loading

@andrewlock
Copy link
Member Author

Benchmarks Report for tracer 🐌

Benchmarks for #6520 compared to master:

  • All benchmarks have the same speed
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.94μs 43.5ns 242ns 0.0167 0.00833 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10μs 53.5ns 278ns 0.0202 0.00505 0 5.8 KB
master StartStopWithChild net472 16.6μs 41.9ns 162ns 1.04 0.326 0.0979 6.22 KB
#6520 StartStopWithChild net6.0 7.82μs 42.8ns 260ns 0.0112 0.00374 0 5.61 KB
#6520 StartStopWithChild netcoreapp3.1 10.1μs 53.5ns 288ns 0.0205 0.0102 0 5.8 KB
#6520 StartStopWithChild net472 16.4μs 45.7ns 177ns 1.05 0.313 0.0989 6.22 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 495μs 470ns 1.82μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 645μs 338ns 1.22μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 859μs 578ns 2.16μs 0.431 0 0 3.3 KB
#6520 WriteAndFlushEnrichedTraces net6.0 482μs 231ns 866ns 0 0 0 2.7 KB
#6520 WriteAndFlushEnrichedTraces netcoreapp3.1 666μs 418ns 1.56μs 0 0 0 2.7 KB
#6520 WriteAndFlushEnrichedTraces net472 857μs 395ns 1.53μs 0.428 0 0 3.3 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 153μs 996ns 9.86μs 0.144 0 0 14.47 KB
master SendRequest netcoreapp3.1 168μs 1.02μs 10.1μs 0.171 0 0 17.27 KB
master SendRequest net472 0.00281ns 0.00139ns 0.0054ns 0 0 0 0 b
#6520 SendRequest net6.0 155μs 905ns 8.59μs 0.156 0 0 14.47 KB
#6520 SendRequest netcoreapp3.1 175μs 969ns 8.62μs 0.159 0 0 17.27 KB
#6520 SendRequest net472 0.000259ns 0.000209ns 0.000808ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 552μs 2.55μs 9.19μs 0.546 0 0 41.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 692μs 3.51μs 21.9μs 0.342 0 0 41.88 KB
master WriteAndFlushEnrichedTraces net472 862μs 4.07μs 15.8μs 8.25 2.6 0.434 53.3 KB
#6520 WriteAndFlushEnrichedTraces net6.0 564μs 3μs 16.2μs 0.561 0 0 41.56 KB
#6520 WriteAndFlushEnrichedTraces netcoreapp3.1 685μs 3.97μs 34.8μs 0.329 0 0 41.85 KB
#6520 WriteAndFlushEnrichedTraces net472 846μs 2.96μs 11.1μs 8.81 2.8 0.401 53.3 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.24μs 1.47ns 5.71ns 0.0142 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.78μs 2.21ns 8.56ns 0.0134 0 0 1.02 KB
master ExecuteNonQuery net472 2.13μs 1.64ns 6.37ns 0.157 0.00105 0 987 B
#6520 ExecuteNonQuery net6.0 1.31μs 1.25ns 4.86ns 0.0145 0 0 1.02 KB
#6520 ExecuteNonQuery netcoreapp3.1 1.81μs 2.58ns 10ns 0.0135 0 0 1.02 KB
#6520 ExecuteNonQuery net472 2.16μs 4.61ns 16.6ns 0.157 0.00107 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.2μs 0.533ns 1.99ns 0.0133 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.53μs 0.791ns 3.07ns 0.0131 0 0 976 B
master CallElasticsearch net472 2.59μs 1.19ns 4.45ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.35μs 0.602ns 2.25ns 0.0135 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.66μs 0.958ns 3.58ns 0.0139 0 0 1.02 KB
master CallElasticsearchAsync net472 2.58μs 0.696ns 2.51ns 0.166 0 0 1.05 KB
#6520 CallElasticsearch net6.0 1.23μs 0.412ns 1.54ns 0.0136 0 0 976 B
#6520 CallElasticsearch netcoreapp3.1 1.54μs 0.822ns 3.08ns 0.013 0 0 976 B
#6520 CallElasticsearch net472 2.52μs 1.63ns 6.3ns 0.157 0 0 995 B
#6520 CallElasticsearchAsync net6.0 1.39μs 0.544ns 2.04ns 0.0132 0 0 952 B
#6520 CallElasticsearchAsync netcoreapp3.1 1.64μs 1.1ns 4.24ns 0.0138 0 0 1.02 KB
#6520 CallElasticsearchAsync net472 2.58μs 1ns 3.74ns 0.167 0 0 1.05 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.37μs 1.06ns 3.98ns 0.0131 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.7μs 1.04ns 3.75ns 0.0122 0 0 952 B
master ExecuteAsync net472 1.8μs 0.423ns 1.64ns 0.145 0 0 915 B
#6520 ExecuteAsync net6.0 1.33μs 0.538ns 2.08ns 0.0133 0 0 952 B
#6520 ExecuteAsync netcoreapp3.1 1.69μs 0.578ns 2.16ns 0.0126 0 0 952 B
#6520 ExecuteAsync net472 1.77μs 1.53ns 5.73ns 0.145 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 4.41μs 2.11ns 8.17ns 0.031 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.24μs 2.83ns 11ns 0.0365 0 0 2.85 KB
master SendAsync net472 7.24μs 1.45ns 5.62ns 0.495 0 0 3.12 KB
#6520 SendAsync net6.0 4.52μs 1.52ns 5.49ns 0.0314 0 0 2.31 KB
#6520 SendAsync netcoreapp3.1 5.19μs 2.13ns 8.26ns 0.0388 0 0 2.85 KB
#6520 SendAsync net472 7.35μs 1.67ns 6.46ns 0.492 0 0 3.12 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.46μs 0.759ns 2.74ns 0.0224 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.29μs 0.864ns 3.12ns 0.0219 0 0 1.64 KB
master EnrichedLog net472 2.67μs 1.1ns 4.26ns 0.249 0 0 1.57 KB
#6520 EnrichedLog net6.0 1.5μs 0.672ns 2.6ns 0.0225 0 0 1.64 KB
#6520 EnrichedLog netcoreapp3.1 2.25μs 1.42ns 5.31ns 0.0226 0 0 1.64 KB
#6520 EnrichedLog net472 2.76μs 1.18ns 4.24ns 0.249 0 0 1.57 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 118μs 207ns 801ns 0.0593 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 121μs 236ns 914ns 0.0608 0 0 4.28 KB
master EnrichedLog net472 151μs 286ns 1.11μs 0.685 0.228 0 4.46 KB
#6520 EnrichedLog net6.0 117μs 130ns 502ns 0 0 0 4.28 KB
#6520 EnrichedLog netcoreapp3.1 122μs 217ns 842ns 0 0 0 4.28 KB
#6520 EnrichedLog net472 152μs 252ns 974ns 0.69 0.23 0 4.46 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.18ns 4.58ns 0.0312 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.07μs 1.37ns 5.32ns 0.0305 0 0 2.2 KB
master EnrichedLog net472 4.77μs 0.738ns 2.86ns 0.32 0 0 2.02 KB
#6520 EnrichedLog net6.0 3.05μs 0.84ns 3.25ns 0.0305 0 0 2.2 KB
#6520 EnrichedLog netcoreapp3.1 4.15μs 1.68ns 6.5ns 0.0287 0 0 2.2 KB
#6520 EnrichedLog net472 4.94μs 2.19ns 8.46ns 0.319 0 0 2.02 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.32μs 0.837ns 3.24ns 0.0165 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.76μs 0.695ns 2.69ns 0.0158 0 0 1.14 KB
master SendReceive net472 2.12μs 1.19ns 4.62ns 0.183 0 0 1.16 KB
#6520 SendReceive net6.0 1.45μs 1.28ns 4.96ns 0.016 0 0 1.14 KB
#6520 SendReceive netcoreapp3.1 1.85μs 7.08ns 27.4ns 0.0155 0 0 1.14 KB
#6520 SendReceive net472 2.14μs 2.49ns 9.33ns 0.183 0 0 1.16 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.71μs 1.68ns 6.52ns 0.0217 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.79μs 1.39ns 5.39ns 0.0212 0 0 1.65 KB
master EnrichedLog net472 4.32μs 2.07ns 7.45ns 0.323 0 0 2.04 KB
#6520 EnrichedLog net6.0 2.65μs 0.907ns 3.27ns 0.0225 0 0 1.6 KB
#6520 EnrichedLog netcoreapp3.1 3.96μs 1.11ns 4.3ns 0.0219 0 0 1.65 KB
#6520 EnrichedLog net472 4.39μs 0.878ns 3.04ns 0.323 0 0 2.04 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 403ns 0.294ns 1.14ns 0.0081 0 0 576 B
master StartFinishSpan netcoreapp3.1 672ns 0.344ns 1.29ns 0.00773 0 0 576 B
master StartFinishSpan net472 652ns 0.379ns 1.47ns 0.0915 0 0 578 B
master StartFinishScope net6.0 489ns 0.132ns 0.496ns 0.0097 0 0 696 B
master StartFinishScope netcoreapp3.1 703ns 1.02ns 3.97ns 0.0092 0 0 696 B
master StartFinishScope net472 895ns 0.341ns 1.32ns 0.104 0 0 658 B
#6520 StartFinishSpan net6.0 404ns 0.238ns 0.922ns 0.00807 0 0 576 B
#6520 StartFinishSpan netcoreapp3.1 613ns 0.675ns 2.61ns 0.00777 0 0 576 B
#6520 StartFinishSpan net472 677ns 0.351ns 1.36ns 0.0917 0 0 578 B
#6520 StartFinishScope net6.0 503ns 0.265ns 1.03ns 0.00981 0 0 696 B
#6520 StartFinishScope netcoreapp3.1 757ns 0.311ns 1.12ns 0.00914 0 0 696 B
#6520 StartFinishScope net472 806ns 0.641ns 2.48ns 0.104 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 597ns 0.244ns 0.914ns 0.0096 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 942ns 0.346ns 1.34ns 0.00956 0 0 696 B
master RunOnMethodBegin net472 1.09μs 0.8ns 3.1ns 0.104 0 0 658 B
#6520 RunOnMethodBegin net6.0 605ns 0.296ns 1.11ns 0.00962 0 0 696 B
#6520 RunOnMethodBegin netcoreapp3.1 893ns 1.35ns 5.25ns 0.00932 0 0 696 B
#6520 RunOnMethodBegin net472 1.12μs 0.557ns 2.16ns 0.104 0 0 658 B

@andrewlock andrewlock merged commit 446c880 into master Jan 10, 2025
59 of 63 checks passed
@andrewlock andrewlock deleted the andrew/actually-dump-children branch January 10, 2025 12:37
@github-actions github-actions bot added this to the vNext-v3 milestone Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tests unit tests, integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants