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

[Dynamic Instrumentation] Change the way we are using the gzip stream in SymDB #6562

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

dudikeleti
Copy link
Contributor

Summary of changes

When we upload symbols, we want to use the underline stream after we are disposing the gzip stream

@dudikeleti dudikeleti requested a review from a team as a code owner January 16, 2025 11:53
@dudikeleti dudikeleti force-pushed the dudik/symdb-fix-using branch from 1dc9b07 to fed6099 Compare January 16, 2025 11:54
@github-actions github-actions bot added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:debugger labels Jan 16, 2025
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.

Thanks, much cleaner, just one small suggestion!

@dudikeleti dudikeleti force-pushed the dudik/symdb-fix-using branch from a7fa34e to ccc395c Compare January 16, 2025 12:14
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jan 16, 2025

Datadog Report

Branch report: dudik/symdb-fix-using
Commit report: 421649b
Test service: dd-trace-dotnet

✅ 0 Failed, 257648 Passed, 2858 Skipped, 32h 28m 52.23s Total Time

@andrewlock
Copy link
Member

andrewlock commented Jan 16, 2025

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

    section CallTarget+Inlining+NGEN
    This PR (6562) - mean (981ms)  : 959, 1003
     .   : milestone, 981,
    master - mean (979ms)  : 949, 1008
     .   : milestone, 979,

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

    section CallTarget+Inlining+NGEN
    This PR (6562) - mean (678ms)  : 663, 693
     .   : milestone, 678,
    master - mean (679ms)  : 663, 694
     .   : milestone, 679,

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

    section CallTarget+Inlining+NGEN
    This PR (6562) - mean (636ms)  : 617, 655
     .   : milestone, 636,
    master - mean (633ms)  : 621, 646
     .   : milestone, 633,

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

    section CallTarget+Inlining+NGEN
    This PR (6562) - mean (1,088ms)  : 1053, 1123
     .   : milestone, 1088,
    master - mean (1,089ms)  : 1065, 1113
     .   : milestone, 1089,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6562) - mean (274ms)  : 270, 278
     .   : milestone, 274,
    master - mean (274ms)  : 270, 278
     .   : milestone, 274,

    section CallTarget+Inlining+NGEN
    This PR (6562) - mean (867ms)  : 838, 897
     .   : milestone, 867,
    master - mean (866ms)  : 836, 895
     .   : milestone, 866,

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

    section CallTarget+Inlining+NGEN
    This PR (6562) - mean (847ms)  : 816, 878
     .   : milestone, 847,
    master - mean (850ms)  : 808, 891
     .   : milestone, 850,

Loading

Copy link
Contributor

@GreenMatan GreenMatan left a comment

Choose a reason for hiding this comment

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

LGTM

@dudikeleti dudikeleti force-pushed the dudik/symdb-fix-using branch from ccc395c to 421649b Compare January 16, 2025 23:57
@andrewlock
Copy link
Member

Benchmarks Report for tracer 🐌

Benchmarks for #6562 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 8.08μs 45.6ns 329ns 0.0236 0.00786 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10.3μs 54.7ns 300ns 0.0202 0.0101 0 5.8 KB
master StartStopWithChild net472 16.5μs 65.6ns 254ns 1.03 0.296 0.0961 6.21 KB
#6562 StartStopWithChild net6.0 8.13μs 41.7ns 209ns 0.0193 0.00772 0 5.61 KB
#6562 StartStopWithChild netcoreapp3.1 10.1μs 56.9ns 369ns 0.0193 0.00967 0 5.8 KB
#6562 StartStopWithChild net472 16.2μs 50.5ns 196ns 1.04 0.303 0.0955 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 501μs 359ns 1.39μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 646μs 463ns 1.73μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 868μs 1.55μs 6μs 0.434 0 0 3.3 KB
#6562 WriteAndFlushEnrichedTraces net6.0 467μs 261ns 942ns 0 0 0 2.7 KB
#6562 WriteAndFlushEnrichedTraces netcoreapp3.1 670μs 668ns 2.59μs 0 0 0 2.7 KB
#6562 WriteAndFlushEnrichedTraces net472 860μs 468ns 1.81μ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 155μs 905ns 8.34μs 0.203 0 0 14.47 KB
master SendRequest netcoreapp3.1 176μs 1.28μs 12.5μs 0.16 0 0 17.27 KB
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#6562 SendRequest net6.0 152μs 898ns 8.89μs 0.159 0 0 14.47 KB
#6562 SendRequest netcoreapp3.1 173μs 1μs 8.79μs 0.169 0 0 17.27 KB
#6562 SendRequest net472 0.00039ns 0.000278ns 0.00104ns 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 571μs 3.15μs 18.6μs 0.548 0 0 41.65 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 685μs 3.91μs 30μs 0.342 0 0 41.74 KB
master WriteAndFlushEnrichedTraces net472 843μs 2.3μs 8.92μs 8.33 2.5 0.417 53.31 KB
#6562 WriteAndFlushEnrichedTraces net6.0 569μs 3.11μs 17.3μs 0.568 0 0 41.55 KB
#6562 WriteAndFlushEnrichedTraces netcoreapp3.1 668μs 3.48μs 17.4μs 0.332 0 0 41.79 KB
#6562 WriteAndFlushEnrichedTraces net472 843μs 2.62μs 10.2μs 8.13 2.57 0.428 53.29 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.29μs 1.32ns 4.94ns 0.0141 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.7μs 1.62ns 6.29ns 0.0135 0 0 1.02 KB
master ExecuteNonQuery net472 2.12μs 1.22ns 4.23ns 0.156 0.00107 0 987 B
#6562 ExecuteNonQuery net6.0 1.33μs 1.78ns 6.91ns 0.014 0 0 1.02 KB
#6562 ExecuteNonQuery netcoreapp3.1 1.8μs 1.7ns 6.59ns 0.0135 0 0 1.02 KB
#6562 ExecuteNonQuery net472 2.05μs 2.08ns 8.06ns 0.157 0.00102 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.31μs 0.547ns 2.12ns 0.0132 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.58μs 1.17ns 4.05ns 0.0127 0 0 976 B
master CallElasticsearch net472 2.55μs 1.65ns 6.38ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.3μs 0.628ns 2.43ns 0.0131 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.68μs 1.44ns 5.38ns 0.0137 0 0 1.02 KB
master CallElasticsearchAsync net472 2.62μs 2.44ns 9.45ns 0.166 0 0 1.05 KB
#6562 CallElasticsearch net6.0 1.18μs 0.649ns 2.43ns 0.0136 0 0 976 B
#6562 CallElasticsearch netcoreapp3.1 1.59μs 0.538ns 2.01ns 0.0128 0 0 976 B
#6562 CallElasticsearch net472 2.59μs 1.51ns 5.86ns 0.158 0 0 995 B
#6562 CallElasticsearchAsync net6.0 1.24μs 0.583ns 2.18ns 0.0129 0 0 952 B
#6562 CallElasticsearchAsync netcoreapp3.1 1.67μs 0.493ns 1.78ns 0.0135 0 0 1.02 KB
#6562 CallElasticsearchAsync net472 2.77μs 2.54ns 9.16ns 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.22μs 1.44ns 5.58ns 0.0135 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.61μs 0.7ns 2.52ns 0.0123 0 0 952 B
master ExecuteAsync net472 1.86μs 0.398ns 1.49ns 0.145 0 0 915 B
#6562 ExecuteAsync net6.0 1.27μs 1.61ns 6.03ns 0.0134 0 0 952 B
#6562 ExecuteAsync netcoreapp3.1 1.57μs 0.853ns 3.08ns 0.0127 0 0 952 B
#6562 ExecuteAsync net472 1.79μs 0.517ns 2ns 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.35μs 1.42ns 5.49ns 0.0327 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.54μs 6.32ns 22.8ns 0.036 0 0 2.85 KB
master SendAsync net472 7.41μs 6.43ns 24ns 0.494 0 0 3.12 KB
#6562 SendAsync net6.0 4.42μs 1.09ns 3.94ns 0.0309 0 0 2.31 KB
#6562 SendAsync netcoreapp3.1 5.32μs 1.87ns 6.98ns 0.0372 0 0 2.85 KB
#6562 SendAsync net472 7.28μs 1.4ns 5.24ns 0.496 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.54μs 0.994ns 3.85ns 0.0226 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.25μs 1.2ns 4.63ns 0.0215 0 0 1.64 KB
master EnrichedLog net472 2.52μs 0.85ns 3.18ns 0.249 0 0 1.57 KB
#6562 EnrichedLog net6.0 1.48μs 0.815ns 3.05ns 0.0228 0 0 1.64 KB
#6562 EnrichedLog netcoreapp3.1 2.22μs 0.799ns 2.99ns 0.0221 0 0 1.64 KB
#6562 EnrichedLog net472 2.49μs 1.37ns 5.32ns 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 159ns 617ns 0.0576 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 119μs 182ns 705ns 0.0598 0 0 4.28 KB
master EnrichedLog net472 150μs 95.3ns 369ns 0.678 0.226 0 4.46 KB
#6562 EnrichedLog net6.0 117μs 120ns 463ns 0.0582 0 0 4.28 KB
#6562 EnrichedLog netcoreapp3.1 120μs 143ns 536ns 0 0 0 4.28 KB
#6562 EnrichedLog net472 151μs 75.1ns 291ns 0.676 0.225 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 1.5ns 5.6ns 0.0304 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.22μs 1.95ns 7.55ns 0.0295 0 0 2.2 KB
master EnrichedLog net472 5.08μs 1.47ns 5.68ns 0.32 0 0 2.02 KB
#6562 EnrichedLog net6.0 2.94μs 1.92ns 7.42ns 0.0309 0 0 2.2 KB
#6562 EnrichedLog netcoreapp3.1 4.28μs 1.88ns 7.27ns 0.0301 0 0 2.2 KB
#6562 EnrichedLog net472 4.99μs 2.97ns 11.5ns 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.42μs 1.25ns 4.83ns 0.016 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.81μs 0.829ns 3.1ns 0.0153 0 0 1.14 KB
master SendReceive net472 2.12μs 1.26ns 4.87ns 0.183 0 0 1.16 KB
#6562 SendReceive net6.0 1.33μs 0.553ns 2.14ns 0.0157 0 0 1.14 KB
#6562 SendReceive netcoreapp3.1 1.82μs 0.757ns 2.93ns 0.0155 0 0 1.14 KB
#6562 SendReceive net472 2.02μs 0.922ns 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.81μs 0.915ns 3.54ns 0.0224 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.83μs 1.85ns 6.94ns 0.021 0 0 1.65 KB
master EnrichedLog net472 4.46μs 3.74ns 14.5ns 0.323 0 0 2.04 KB
#6562 EnrichedLog net6.0 2.76μs 0.753ns 2.82ns 0.0221 0 0 1.6 KB
#6562 EnrichedLog netcoreapp3.1 3.84μs 2.24ns 8.66ns 0.0227 0 0 1.65 KB
#6562 EnrichedLog net472 4.42μs 1.51ns 5.63ns 0.322 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 447ns 0.151ns 0.583ns 0.00811 0 0 576 B
master StartFinishSpan netcoreapp3.1 611ns 0.424ns 1.64ns 0.00795 0 0 576 B
master StartFinishSpan net472 683ns 0.429ns 1.66ns 0.0915 0 0 578 B
master StartFinishScope net6.0 497ns 0.256ns 0.992ns 0.0096 0 0 696 B
master StartFinishScope netcoreapp3.1 755ns 0.555ns 2.15ns 0.00941 0 0 696 B
master StartFinishScope net472 886ns 0.58ns 2.17ns 0.104 0 0 658 B
#6562 StartFinishSpan net6.0 406ns 0.291ns 1.13ns 0.00817 0 0 576 B
#6562 StartFinishSpan netcoreapp3.1 606ns 0.313ns 1.21ns 0.00788 0 0 576 B
#6562 StartFinishSpan net472 689ns 0.579ns 2.17ns 0.0917 0 0 578 B
#6562 StartFinishScope net6.0 510ns 0.262ns 0.981ns 0.00967 0 0 696 B
#6562 StartFinishScope netcoreapp3.1 725ns 0.773ns 2.99ns 0.00949 0 0 696 B
#6562 StartFinishScope net472 969ns 0.577ns 2.23ns 0.105 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 657ns 0.462ns 1.79ns 0.00955 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 889ns 2.67ns 10.3ns 0.00933 0 0 696 B
master RunOnMethodBegin net472 1.12μs 0.457ns 1.77ns 0.104 0 0 658 B
#6562 RunOnMethodBegin net6.0 638ns 0.395ns 1.53ns 0.00989 0 0 696 B
#6562 RunOnMethodBegin netcoreapp3.1 918ns 0.597ns 2.31ns 0.00959 0 0 696 B
#6562 RunOnMethodBegin net472 1.18μs 0.421ns 1.58ns 0.104 0 0 658 B

@dudikeleti dudikeleti merged commit 18c2f0f into master Jan 17, 2025
129 of 132 checks passed
@dudikeleti dudikeleti deleted the dudik/symdb-fix-using branch January 17, 2025 06:37
@github-actions github-actions bot added this to the vNext-v3 milestone Jan 17, 2025
@andrewlock andrewlock removed the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants