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

[Profiler] Fix typo in crash fix #5692

Merged
merged 1 commit into from
Jun 14, 2024
Merged

[Profiler] Fix typo in crash fix #5692

merged 1 commit into from
Jun 14, 2024

Conversation

chrisnas
Copy link
Contributor

Summary of changes

Check the right class ID

Reason for change

Invalid class ID check

Implementation details

Fix typo

Test coverage

Other details

@chrisnas chrisnas requested review from a team as code owners June 14, 2024 13:51
@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Jun 14, 2024
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet 😃

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jun 14, 2024

Datadog Report

Branch report: chrisnas/fix_typo
Commit report: 1914e35
Test service: dd-trace-dotnet

✅ 0 Failed, 339512 Passed, 1940 Skipped, 15h 25m 58.94s Total Time

@andrewlock
Copy link
Member

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 (5692) - mean (73ms)  : 66, 81
     .   : milestone, 73,
    master - mean (75ms)  : 63, 87
     .   : milestone, 75,

    section CallTarget+Inlining+NGEN
    This PR (5692) - mean (1,007ms)  : 987, 1026
     .   : milestone, 1007,
    master - mean (1,017ms)  : 1000, 1034
     .   : milestone, 1017,

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

    section CallTarget+Inlining+NGEN
    This PR (5692) - mean (726ms)  : 706, 745
     .   : milestone, 726,
    master - mean (734ms)  : 715, 752
     .   : milestone, 734,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5692) - mean (94ms)  : 90, 97
     .   : milestone, 94,
    master - mean (95ms)  : 91, 98
     .   : milestone, 95,

    section CallTarget+Inlining+NGEN
    This PR (5692) - mean (681ms)  : 660, 702
     .   : milestone, 681,
    master - mean (684ms)  : 663, 705
     .   : milestone, 684,

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

    section CallTarget+Inlining+NGEN
    This PR (5692) - mean (1,115ms)  : 1088, 1143
     .   : milestone, 1115,
    master - mean (1,105ms)  : 1083, 1127
     .   : milestone, 1105,

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

    section CallTarget+Inlining+NGEN
    This PR (5692) - mean (914ms)  : 894, 934
     .   : milestone, 914,
    master - mean (907ms)  : 880, 934
     .   : milestone, 907,

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

    section CallTarget+Inlining+NGEN
    This PR (5692) - mean (898ms)  : 870, 926
     .   : milestone, 898,
    master - mean (890ms)  : 871, 910
     .   : milestone, 890,

Loading

@andrewlock
Copy link
Member

Benchmarks Report for tracer 🐌

Benchmarks for #5692 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.191
  • 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.81μs 44.9ns 353ns 0.016 0.00798 0 5.42 KB
master StartStopWithChild netcoreapp3.1 9.83μs 55.3ns 387ns 0.0148 0.00492 0 5.62 KB
master StartStopWithChild net472 16.3μs 51.4ns 199ns 1.04 0.318 0.0979 6.06 KB
#5692 StartStopWithChild net6.0 7.72μs 42.6ns 263ns 0.0112 0.00374 0 5.43 KB
#5692 StartStopWithChild netcoreapp3.1 9.97μs 50.1ns 270ns 0.0241 0.00963 0 5.62 KB
#5692 StartStopWithChild net472 15.9μs 36.3ns 136ns 1.03 0.316 0.0949 6.06 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 476μs 262ns 1.01μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 619μs 107ns 387ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 829μs 370ns 1.43μs 0.414 0 0 3.3 KB
#5692 WriteAndFlushEnrichedTraces net6.0 480μs 203ns 761ns 0 0 0 2.7 KB
#5692 WriteAndFlushEnrichedTraces netcoreapp3.1 636μs 451ns 1.75μs 0 0 0 2.7 KB
#5692 WriteAndFlushEnrichedTraces net472 826μs 237ns 918ns 0.411 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 169μs 197ns 761ns 0.252 0 0 18.44 KB
master SendRequest netcoreapp3.1 192μs 413ns 1.6μs 0.191 0 0 20.6 KB
master SendRequest net472 0.0011ns 0.000301ns 0.00116ns 0 0 0 0 b
#5692 SendRequest net6.0 170μs 204ns 790ns 0.171 0 0 18.44 KB
#5692 SendRequest netcoreapp3.1 192μs 238ns 920ns 0.191 0 0 20.6 KB
#5692 SendRequest net472 0.00102ns 0.000326ns 0.00122ns 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 556μs 320ns 1.24μs 0.546 0 0 41.68 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 664μs 1.09μs 4.23μs 0.327 0 0 41.74 KB
master WriteAndFlushEnrichedTraces net472 873μs 3.6μs 13.5μs 8.45 2.53 0.422 53.26 KB
#5692 WriteAndFlushEnrichedTraces net6.0 536μs 828ns 3.21μs 0.543 0 0 41.73 KB
#5692 WriteAndFlushEnrichedTraces netcoreapp3.1 643μs 1.89μs 7.31μs 0.316 0 0 41.59 KB
#5692 WriteAndFlushEnrichedTraces net472 852μs 3.71μs 15.7μs 8.08 2.55 0.425 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.07μs 0.632ns 2.36ns 0.0112 0 0 808 B
master ExecuteNonQuery netcoreapp3.1 1.48μs 0.749ns 2.7ns 0.011 0 0 808 B
master ExecuteNonQuery net472 1.67μs 4.7ns 18.2ns 0.122 0 0 770 B
#5692 ExecuteNonQuery net6.0 1.13μs 0.873ns 3.38ns 0.0112 0 0 808 B
#5692 ExecuteNonQuery netcoreapp3.1 1.54μs 0.86ns 3.33ns 0.0108 0 0 808 B
#5692 ExecuteNonQuery net472 1.67μs 0.786ns 2.72ns 0.122 0 0 770 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.21μs 0.688ns 2.67ns 0.0133 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.53μs 0.739ns 2.66ns 0.0128 0 0 976 B
master CallElasticsearch net472 2.5μs 2.89ns 11.2ns 0.158 0.00124 0 995 B
master CallElasticsearchAsync net6.0 1.29μs 0.532ns 1.92ns 0.0129 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.48μs 0.576ns 2.23ns 0.0141 0 0 1.02 KB
master CallElasticsearchAsync net472 2.57μs 1.97ns 7.64ns 0.166 0 0 1.05 KB
#5692 CallElasticsearch net6.0 1.23μs 1.55ns 6ns 0.0135 0 0 976 B
#5692 CallElasticsearch netcoreapp3.1 1.6μs 0.912ns 3.41ns 0.0129 0 0 976 B
#5692 CallElasticsearch net472 2.46μs 2.65ns 9.54ns 0.158 0 0 995 B
#5692 CallElasticsearchAsync net6.0 1.28μs 0.633ns 2.37ns 0.0128 0 0 952 B
#5692 CallElasticsearchAsync netcoreapp3.1 1.65μs 2.52ns 9.78ns 0.0139 0 0 1.02 KB
#5692 CallElasticsearchAsync net472 2.49μs 2.36ns 9.16ns 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.27μs 0.401ns 1.5ns 0.0133 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.61μs 1.16ns 4.35ns 0.0129 0 0 952 B
master ExecuteAsync net472 1.78μs 0.706ns 2.74ns 0.145 0 0 915 B
#5692 ExecuteAsync net6.0 1.25μs 2.56ns 9.92ns 0.0132 0 0 952 B
#5692 ExecuteAsync netcoreapp3.1 1.58μs 0.875ns 3.27ns 0.0126 0 0 952 B
#5692 ExecuteAsync net472 1.77μs 0.516ns 1.93ns 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.17μs 1.66ns 6.21ns 0.0313 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.19μs 2.93ns 11.4ns 0.0365 0 0 2.76 KB
master SendAsync net472 7.71μs 1.72ns 6.19ns 0.496 0 0 3.15 KB
#5692 SendAsync net6.0 4.12μs 1.37ns 5.14ns 0.0311 0 0 2.22 KB
#5692 SendAsync netcoreapp3.1 4.96μs 1.89ns 7.32ns 0.0373 0 0 2.76 KB
#5692 SendAsync net472 7.6μs 3.82ns 14.8ns 0.497 0 0 3.15 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.5μs 0.57ns 2.13ns 0.0231 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.1μs 1.29ns 4.99ns 0.0222 0 0 1.64 KB
master EnrichedLog net472 2.44μs 1.02ns 3.67ns 0.25 0 0 1.57 KB
#5692 EnrichedLog net6.0 1.44μs 1.03ns 4ns 0.0229 0 0 1.64 KB
#5692 EnrichedLog netcoreapp3.1 2.17μs 0.919ns 3.44ns 0.0217 0 0 1.64 KB
#5692 EnrichedLog net472 2.57μs 0.773ns 2.99ns 0.25 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 114μs 65.8ns 255ns 0 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 118μs 155ns 600ns 0.0588 0 0 4.28 KB
master EnrichedLog net472 145μs 53.5ns 207ns 0.653 0.218 0 4.46 KB
#5692 EnrichedLog net6.0 112μs 54.7ns 212ns 0.0559 0 0 4.28 KB
#5692 EnrichedLog netcoreapp3.1 120μs 239ns 927ns 0 0 0 4.28 KB
#5692 EnrichedLog net472 145μs 159ns 572ns 0.652 0.217 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 2.92μs 1.3ns 4.86ns 0.0307 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.08μs 1.95ns 7.01ns 0.0283 0 0 2.2 KB
master EnrichedLog net472 4.76μs 1.48ns 5.75ns 0.321 0 0 2.02 KB
#5692 EnrichedLog net6.0 3.01μs 0.946ns 3.67ns 0.03 0 0 2.2 KB
#5692 EnrichedLog netcoreapp3.1 4.13μs 3.91ns 14.6ns 0.0295 0 0 2.2 KB
#5692 EnrichedLog net472 5.08μs 8.58ns 32.1ns 0.32 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.36μs 1.21ns 4.69ns 0.0158 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.85μs 0.84ns 3.26ns 0.0157 0 0 1.14 KB
master SendReceive net472 2.1μs 0.865ns 3.35ns 0.183 0 0 1.16 KB
#5692 SendReceive net6.0 1.34μs 0.428ns 1.66ns 0.0161 0 0 1.14 KB
#5692 SendReceive netcoreapp3.1 1.75μs 0.299ns 1.12ns 0.0149 0 0 1.14 KB
#5692 SendReceive net472 2.03μs 0.858ns 3.32ns 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.24ns 4.8ns 0.0216 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.79μs 2.14ns 8.27ns 0.0211 0 0 1.65 KB
master EnrichedLog net472 4.42μs 4.09ns 15.8ns 0.324 0 0 2.04 KB
#5692 EnrichedLog net6.0 2.79μs 0.937ns 3.63ns 0.0223 0 0 1.6 KB
#5692 EnrichedLog netcoreapp3.1 3.91μs 1.23ns 4.59ns 0.0217 0 0 1.65 KB
#5692 EnrichedLog net472 4.34μs 1.6ns 6ns 0.322 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5692

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.191 571.05 479.55

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 387ns 0.152ns 0.59ns 0.00815 0 0 576 B
master StartFinishSpan netcoreapp3.1 548ns 0.276ns 1.07ns 0.00768 0 0 576 B
master StartFinishSpan net472 646ns 0.427ns 1.65ns 0.0917 0 0 578 B
master StartFinishScope net6.0 571ns 0.124ns 0.448ns 0.00964 0 0 696 B
master StartFinishScope netcoreapp3.1 735ns 0.829ns 3.1ns 0.00948 0 0 696 B
master StartFinishScope net472 827ns 1.05ns 3.94ns 0.104 0 0 658 B
#5692 StartFinishSpan net6.0 395ns 0.231ns 0.893ns 0.00813 0 0 576 B
#5692 StartFinishSpan netcoreapp3.1 548ns 0.237ns 0.886ns 0.00801 0 0 576 B
#5692 StartFinishSpan net472 674ns 0.589ns 2.28ns 0.0915 0 0 578 B
#5692 StartFinishScope net6.0 480ns 0.226ns 0.847ns 0.00967 0 0 696 B
#5692 StartFinishScope netcoreapp3.1 751ns 0.769ns 2.98ns 0.00928 0 0 696 B
#5692 StartFinishScope net472 901ns 0.544ns 2.11ns 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 646ns 0.5ns 1.94ns 0.00978 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 899ns 1.7ns 6.57ns 0.00951 0 0 696 B
master RunOnMethodBegin net472 1.09μs 0.979ns 3.79ns 0.104 0 0 658 B
#5692 RunOnMethodBegin net6.0 631ns 3.54ns 22.7ns 0.00977 0 0 696 B
#5692 RunOnMethodBegin netcoreapp3.1 925ns 0.406ns 1.52ns 0.00949 0 0 696 B
#5692 RunOnMethodBegin net472 1.05μs 0.513ns 1.99ns 0.104 0 0 658 B

@andrewlock
Copy link
Member

Throughput/Crank Report:zap:

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 (5692) (11.595M)   : 0, 11595454
    master (11.438M)   : 0, 11438227
    benchmarks/2.9.0 (11.574M)   : 0, 11573681

    section Automatic
    This PR (5692) (7.793M)   : 0, 7793064
    master (7.760M)   : 0, 7760404
    benchmarks/2.9.0 (8.261M)   : 0, 8260805

    section Trace stats
    master (8.093M)   : 0, 8093497

    section Manual
    This PR (5692) (10.084M)   : 0, 10084491
    master (9.921M)   : 0, 9920785

    section Manual + Automatic
    This PR (5692) (7.380M)   : 0, 7380415
    master (7.331M)   : 0, 7330615

    section Version Conflict
    master (6.585M)   : 0, 6585366

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5692) (9.538M)   : 0, 9537894
    master (9.481M)   : 0, 9480572
    benchmarks/2.9.0 (9.623M)   : 0, 9623209

    section Automatic
    This PR (5692) (6.634M)   : 0, 6633785
    master (6.400M)   : 0, 6399659

    section Trace stats
    master (6.953M)   : 0, 6952919

    section Manual
    This PR (5692) (8.300M)   : 0, 8300289
    master (8.277M)   : 0, 8277338

    section Manual + Automatic
    This PR (5692) (6.144M)   : 0, 6144045
    master (6.042M)   : 0, 6041661

    section Version Conflict
    master (5.603M)   : 0, 5603024

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5692) (9.591M)   : 0, 9591306
    master (9.801M)   : 0, 9800651
    benchmarks/2.9.0 (9.948M)   : 0, 9948007

    section Automatic
    This PR (5692) (6.849M)   : 0, 6849349
    master (6.988M)   : 0, 6988350
    benchmarks/2.9.0 (7.263M)   : 0, 7263417

    section Trace stats
    master (7.356M)   : 0, 7356260

    section Manual
    This PR (5692) (8.492M)   : 0, 8492263
    master (8.603M)   : 0, 8602853

    section Manual + Automatic
    This PR (5692) (6.712M)   : 0, 6712129
    master (6.774M)   : 0, 6773730

    section Version Conflict
    master (6.037M)   : 0, 6036783

Loading

@andrewlock andrewlock merged commit c3c7d03 into master Jun 14, 2024
63 of 65 checks passed
@andrewlock andrewlock deleted the chrisnas/fix_typo branch June 14, 2024 16:54
@github-actions github-actions bot added this to the vNext-v2 milestone Jun 14, 2024
andrewlock pushed a commit that referenced this pull request Jun 14, 2024
@andrewlock andrewlock modified the milestones: vNext-v2, 2.53.1 Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:profiler Issues related to the continous-profiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants