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

Try to catch memory dump for instrumentation telemetry tests #6675

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

andrewlock
Copy link
Member

Summary of changes

Try to grab a memory dump if dotnet build fails as part of the instrumentation tests

Reason for change

Since updating to 9.0.102, we've seen cases of the dotnet build hanging on arm64. In this test we explicitly build a "forwarder" app, and that has a hung several times in CI now.

Implementation details

Use the memory dump helper to try to grab a dump. We've only seen this happen on linux arm64 so far, so haven't bothered to hook up the Windows monitoring or anything like that

Test coverage

If the tests pass, that's good enough for me until we see this flake manifest again.

@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Feb 17, 2025
@andrewlock andrewlock requested review from a team as code owners February 17, 2025 13:16
@github-actions github-actions bot added the area:tests unit tests, integration tests label Feb 17, 2025
@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 (6675) - mean (69ms)  : 67, 71
     .   : milestone, 69,
    master - mean (69ms)  : 66, 71
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6675) - mean (1,000ms)  : 980, 1020
     .   : milestone, 1000,
    master - mean (996ms)  : 972, 1019
     .   : milestone, 996,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6675) - mean (102ms)  : 100, 104
     .   : milestone, 102,
    master - mean (101ms)  : 99, 103
     .   : milestone, 101,

    section CallTarget+Inlining+NGEN
    This PR (6675) - mean (677ms)  : 660, 694
     .   : milestone, 677,
    master - mean (675ms)  : 660, 691
     .   : milestone, 675,

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

    section CallTarget+Inlining+NGEN
    This PR (6675) - mean (634ms)  : 611, 657
     .   : milestone, 634,
    master - mean (634ms)  : 614, 654
     .   : milestone, 634,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6675) - mean (191ms)  : 187, 195
     .   : milestone, 191,
    master - mean (191ms)  : 187, 195
     .   : milestone, 191,

    section CallTarget+Inlining+NGEN
    This PR (6675) - mean (1,111ms)  : 1080, 1142
     .   : milestone, 1111,
    master - mean (1,113ms)  : 1085, 1140
     .   : milestone, 1113,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6675) - mean (272ms)  : 267, 277
     .   : milestone, 272,
    master - mean (271ms)  : 266, 276
     .   : milestone, 271,

    section CallTarget+Inlining+NGEN
    This PR (6675) - mean (867ms)  : 844, 889
     .   : milestone, 867,
    master - mean (868ms)  : 837, 898
     .   : milestone, 868,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6675) - mean (262ms)  : 257, 268
     .   : milestone, 262,
    master - mean (262ms)  : 258, 267
     .   : milestone, 262,

    section CallTarget+Inlining+NGEN
    This PR (6675) - mean (846ms)  : 809, 882
     .   : milestone, 846,
    master - mean (848ms)  : 818, 878
     .   : milestone, 848,

Loading

@andrewlock
Copy link
Member Author

Benchmarks Report for tracer 🐌

Benchmarks for #6675 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.160
  • 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.95μs 45.5ns 341ns 0.0115 0.00384 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10.1μs 53.2ns 287ns 0.0202 0.0101 0 5.8 KB
master StartStopWithChild net472 16μs 32.7ns 123ns 1.05 0.327 0.0958 6.2 KB
#6675 StartStopWithChild net6.0 7.78μs 42.9ns 278ns 0.019 0.00758 0 5.61 KB
#6675 StartStopWithChild netcoreapp3.1 9.91μs 55.1ns 362ns 0.0198 0.00989 0 5.8 KB
#6675 StartStopWithChild net472 15.8μs 62.5ns 242ns 1.05 0.311 0.104 6.2 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 491μs 357ns 1.34μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 656μs 518ns 1.94μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 842μs 787ns 3.05μs 0.419 0 0 3.3 KB
#6675 WriteAndFlushEnrichedTraces net6.0 480μs 348ns 1.35μs 0 0 0 2.7 KB
#6675 WriteAndFlushEnrichedTraces netcoreapp3.1 649μs 456ns 1.77μs 0 0 0 2.7 KB
#6675 WriteAndFlushEnrichedTraces net472 845μs 554ns 2.15μs 0.422 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 128μs 423ns 1.64μs 0.13 0 0 14.47 KB
master SendRequest netcoreapp3.1 142μs 616ns 2.39μs 0.215 0 0 17.27 KB
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#6675 SendRequest net6.0 129μs 523ns 2.03μs 0.189 0 0 14.47 KB
#6675 SendRequest netcoreapp3.1 146μs 276ns 1.07μs 0.215 0 0 17.27 KB
#6675 SendRequest net472 0.0126ns 0.00269ns 0.0104ns 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 572μs 3.11μs 17.3μs 0.598 0 0 41.57 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 696μs 3.96μs 27.5μs 0.365 0 0 41.87 KB
master WriteAndFlushEnrichedTraces net472 857μs 3.53μs 13.7μs 8.28 2.48 0.414 53.29 KB
#6675 WriteAndFlushEnrichedTraces net6.0 589μs 2.79μs 15.8μs 0.592 0 0 41.74 KB
#6675 WriteAndFlushEnrichedTraces netcoreapp3.1 644μs 3.38μs 16.9μs 0.332 0 0 41.98 KB
#6675 WriteAndFlushEnrichedTraces net472 832μs 3.86μs 14.4μs 8.22 2.47 0.411 53.26 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.39μs 1.66ns 6.2ns 0.0146 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.74μs 1.29ns 4.84ns 0.0131 0 0 1.02 KB
master ExecuteNonQuery net472 2.05μs 2.51ns 9.38ns 0.156 0.00102 0 987 B
#6675 ExecuteNonQuery net6.0 1.4μs 1.55ns 5.99ns 0.0143 0 0 1.02 KB
#6675 ExecuteNonQuery netcoreapp3.1 1.68μs 1.33ns 5.16ns 0.0135 0 0 1.02 KB
#6675 ExecuteNonQuery net472 2.03μs 2.02ns 7.81ns 0.156 0.00101 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.13μs 1.29ns 4.99ns 0.0134 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.48μs 0.627ns 2.43ns 0.0129 0 0 976 B
master CallElasticsearch net472 2.63μs 13.1ns 54.1ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.32μs 0.85ns 3.29ns 0.0133 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.71μs 1.6ns 6.21ns 0.0138 0 0 1.02 KB
master CallElasticsearchAsync net472 2.71μs 4.08ns 15.8ns 0.167 0 0 1.05 KB
#6675 CallElasticsearch net6.0 1.17μs 0.414ns 1.6ns 0.0135 0 0 976 B
#6675 CallElasticsearch netcoreapp3.1 1.56μs 4.51ns 17.5ns 0.0131 0 0 976 B
#6675 CallElasticsearch net472 2.53μs 1.3ns 5.05ns 0.158 0 0 995 B
#6675 CallElasticsearchAsync net6.0 1.28μs 0.42ns 1.63ns 0.0135 0 0 952 B
#6675 CallElasticsearchAsync netcoreapp3.1 1.72μs 0.72ns 2.79ns 0.0138 0 0 1.02 KB
#6675 CallElasticsearchAsync net472 2.64μs 1.23ns 4.77ns 0.166 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.34μs 0.978ns 3.79ns 0.0134 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.61μs 0.679ns 2.63ns 0.013 0 0 952 B
master ExecuteAsync net472 1.9μs 0.88ns 3.41ns 0.144 0 0 915 B
#6675 ExecuteAsync net6.0 1.31μs 2.11ns 8.17ns 0.0131 0 0 952 B
#6675 ExecuteAsync netcoreapp3.1 1.64μs 1.21ns 4.54ns 0.0132 0 0 952 B
#6675 ExecuteAsync net472 1.84μs 0.405ns 1.52ns 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.47μs 1.75ns 6.3ns 0.032 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.43μs 2.37ns 8.86ns 0.0382 0 0 2.85 KB
master SendAsync net472 7.43μs 2.68ns 10.4ns 0.493 0 0 3.12 KB
#6675 SendAsync net6.0 4.52μs 2.71ns 10.5ns 0.0314 0 0 2.31 KB
#6675 SendAsync netcoreapp3.1 5.36μs 4.74ns 18.4ns 0.0374 0 0 2.85 KB
#6675 SendAsync net472 7.47μs 1.57ns 5.86ns 0.493 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.47μs 0.588ns 2.2ns 0.0226 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.15μs 6.17ns 22.2ns 0.0223 0 0 1.64 KB
master EnrichedLog net472 2.61μs 1.43ns 5.55ns 0.249 0 0 1.57 KB
#6675 EnrichedLog net6.0 1.55μs 0.816ns 3.05ns 0.0231 0 0 1.64 KB
#6675 EnrichedLog netcoreapp3.1 2.13μs 1.1ns 4.12ns 0.0225 0 0 1.64 KB
#6675 EnrichedLog net472 2.63μs 0.994ns 3.72ns 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 113μs 169ns 656ns 0.0564 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 116μs 195ns 755ns 0.058 0 0 4.28 KB
master EnrichedLog net472 152μs 277ns 1.07μs 0.67 0.223 0 4.46 KB
#6675 EnrichedLog net6.0 112μs 88.3ns 342ns 0.0559 0 0 4.28 KB
#6675 EnrichedLog netcoreapp3.1 116μs 177ns 686ns 0 0 0 4.28 KB
#6675 EnrichedLog net472 149μs 139ns 539ns 0.667 0.222 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.04μs 12ns 46.5ns 0.0312 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.11μs 1.89ns 7.33ns 0.0306 0 0 2.2 KB
master EnrichedLog net472 4.82μs 1.35ns 5.04ns 0.32 0 0 2.02 KB
#6675 EnrichedLog net6.0 3.01μs 1.1ns 4.26ns 0.0302 0 0 2.2 KB
#6675 EnrichedLog netcoreapp3.1 4.07μs 2.29ns 8.86ns 0.0306 0 0 2.2 KB
#6675 EnrichedLog net472 4.94μs 1.1ns 4.13ns 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.29μs 0.882ns 3.42ns 0.0162 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.75μs 3.61ns 14ns 0.0157 0 0 1.14 KB
master SendReceive net472 2.18μs 2.48ns 9.29ns 0.183 0 0 1.16 KB
#6675 SendReceive net6.0 1.33μs 0.705ns 2.64ns 0.016 0 0 1.14 KB
#6675 SendReceive netcoreapp3.1 1.79μs 0.875ns 3.39ns 0.0153 0 0 1.14 KB
#6675 SendReceive net472 2.07μs 0.673ns 2.43ns 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.85μs 2.65ns 9.93ns 0.023 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.9μs 1.79ns 6.7ns 0.0214 0 0 1.65 KB
master EnrichedLog net472 4.25μs 2.89ns 11.2ns 0.322 0 0 2.04 KB
#6675 EnrichedLog net6.0 2.89μs 0.616ns 2.3ns 0.0217 0 0 1.6 KB
#6675 EnrichedLog netcoreapp3.1 3.83μs 1.35ns 5.06ns 0.0211 0 0 1.65 KB
#6675 EnrichedLog net472 4.44μs 1.6ns 6.21ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6675

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 1.160 692.21 596.62

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 468ns 0.208ns 0.806ns 0.00798 0 0 576 B
master StartFinishSpan netcoreapp3.1 556ns 0.587ns 2.27ns 0.00776 0 0 576 B
master StartFinishSpan net472 692ns 0.499ns 1.93ns 0.0918 0 0 578 B
master StartFinishScope net6.0 495ns 0.249ns 0.964ns 0.00981 0 0 696 B
master StartFinishScope netcoreapp3.1 706ns 0.646ns 2.5ns 0.00956 0 0 696 B
master StartFinishScope net472 886ns 1.58ns 6.11ns 0.104 0 0 658 B
#6675 StartFinishSpan net6.0 464ns 0.578ns 2.24ns 0.00805 0 0 576 B
#6675 StartFinishSpan netcoreapp3.1 536ns 0.917ns 3.55ns 0.00781 0 0 576 B
#6675 StartFinishSpan net472 597ns 1.42ns 5.51ns 0.0917 0 0 578 B
#6675 StartFinishScope net6.0 482ns 0.923ns 3.57ns 0.0098 0 0 696 B
#6675 StartFinishScope netcoreapp3.1 681ns 1.07ns 4.16ns 0.00934 0 0 696 B
#6675 StartFinishScope net472 805ns 1.56ns 5.63ns 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 610ns 0.318ns 1.23ns 0.00978 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 916ns 1.36ns 5.28ns 0.00932 0 0 696 B
master RunOnMethodBegin net472 1.17μs 0.969ns 3.63ns 0.104 0 0 658 B
#6675 RunOnMethodBegin net6.0 668ns 0.851ns 3.3ns 0.00964 0 0 696 B
#6675 RunOnMethodBegin netcoreapp3.1 913ns 1.71ns 6.61ns 0.00943 0 0 696 B
#6675 RunOnMethodBegin net472 1.11μs 2.62ns 10.2ns 0.104 0 0 658 B

@andrewlock andrewlock merged commit 259d478 into master Feb 17, 2025
140 of 142 checks passed
@andrewlock andrewlock deleted the andrew/ci/capture-dump branch February 17, 2025 17:13
@github-actions github-actions bot added this to the vNext-v3 milestone Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:builds project files, build scripts, pipelines, versioning, releases, packages area:tests unit tests, integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants