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

remove unused variable causing warnings #6546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

vandonr
Copy link
Contributor

@vandonr vandonr commented Jan 14, 2025

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

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.

:ty:

@vandonr vandonr requested review from lucaspimentel and a team January 14, 2025 16:04
@github-actions github-actions bot added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Jan 14, 2025
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jan 14, 2025

Datadog Report

Branch report: vandonr-patch-1
Commit report: 039aa54
Test service: dd-trace-dotnet

✅ 0 Failed, 215821 Passed, 1684 Skipped, 17h 1m 22.15s 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 (6546) - mean (69ms)  : 66, 71
     .   : milestone, 69,
    master - mean (69ms)  : 65, 72
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6546) - mean (979ms)  : 957, 1001
     .   : milestone, 979,
    master - mean (976ms)  : 956, 996
     .   : milestone, 976,

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

    section CallTarget+Inlining+NGEN
    This PR (6546) - mean (680ms)  : 665, 695
     .   : milestone, 680,
    master - mean (672ms)  : 658, 687
     .   : milestone, 672,

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

    section CallTarget+Inlining+NGEN
    This PR (6546) - mean (635ms)  : 617, 654
     .   : milestone, 635,
    master - mean (632ms)  : 619, 646
     .   : milestone, 632,

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

    section CallTarget+Inlining+NGEN
    This PR (6546) - mean (1,096ms)  : 1067, 1125
     .   : milestone, 1096,
    master - mean (1,103ms)  : 1074, 1132
     .   : milestone, 1103,

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

    section CallTarget+Inlining+NGEN
    This PR (6546) - mean (874ms)  : 843, 904
     .   : milestone, 874,
    master - mean (870ms)  : 838, 903
     .   : milestone, 870,

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

    section CallTarget+Inlining+NGEN
    This PR (6546) - mean (851ms)  : 813, 890
     .   : milestone, 851,
    master - mean (850ms)  : 820, 880
     .   : milestone, 850,

Loading

@andrewlock
Copy link
Member

Benchmarks Report for tracer 🐌

Benchmarks for #6546 compared to master:

  • 1 benchmarks are slower, with geometric mean 1.162
  • 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.13μs 45.7ns 307ns 0.017 0.00425 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10.2μs 53.8ns 285ns 0.0147 0.00489 0 5.8 KB
master StartStopWithChild net472 16.3μs 57.4ns 222ns 1.05 0.311 0.0981 6.21 KB
#6546 StartStopWithChild net6.0 7.93μs 42.8ns 246ns 0.0157 0.00783 0 5.62 KB
#6546 StartStopWithChild netcoreapp3.1 9.99μs 52.3ns 251ns 0.0198 0.00991 0 5.8 KB
#6546 StartStopWithChild net472 16.3μs 37.9ns 147ns 1.06 0.32 0.107 6.21 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 489μs 475ns 1.84μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 660μs 699ns 2.71μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 858μs 814ns 3.15μs 0.428 0 0 3.3 KB
#6546 WriteAndFlushEnrichedTraces net6.0 489μs 329ns 1.28μs 0 0 0 2.7 KB
#6546 WriteAndFlushEnrichedTraces netcoreapp3.1 656μs 421ns 1.63μs 0 0 0 2.7 KB
#6546 WriteAndFlushEnrichedTraces net472 868μs 859ns 3.33μs 0.434 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 149μs 867ns 7.51μs 0.148 0 0 14.47 KB
master SendRequest netcoreapp3.1 176μs 1.05μs 10.5μs 0.175 0 0 17.27 KB
master SendRequest net472 0.00194ns 0.000812ns 0.00315ns 0 0 0 0 b
#6546 SendRequest net6.0 157μs 1.1μs 10.8μs 0.147 0 0 14.47 KB
#6546 SendRequest netcoreapp3.1 173μs 1.09μs 10.7μs 0.187 0 0 17.27 KB
#6546 SendRequest net472 0.00696ns 0.00173ns 0.0067ns 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 578μs 3.24μs 22.2μs 0.579 0 0 41.61 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 670μs 2.8μs 14.3μs 0.334 0 0 41.75 KB
master WriteAndFlushEnrichedTraces net472 823μs 3.77μs 14.1μs 8.63 2.47 0.411 53.32 KB
#6546 WriteAndFlushEnrichedTraces net6.0 564μs 3.19μs 21.4μs 0.558 0 0 41.59 KB
#6546 WriteAndFlushEnrichedTraces netcoreapp3.1 667μs 3.66μs 20.7μs 0.329 0 0 41.86 KB
#6546 WriteAndFlushEnrichedTraces net472 879μs 4.31μs 19.3μs 8.3 2.62 0.437 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.32μs 1.18ns 4.4ns 0.0144 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.76μs 1.16ns 4.33ns 0.0131 0 0 1.02 KB
master ExecuteNonQuery net472 2.12μs 1.88ns 7.28ns 0.156 0.00106 0 987 B
#6546 ExecuteNonQuery net6.0 1.33μs 2.36ns 9.13ns 0.0141 0 0 1.02 KB
#6546 ExecuteNonQuery netcoreapp3.1 1.76μs 1.73ns 6.7ns 0.013 0 0 1.02 KB
#6546 ExecuteNonQuery net472 2.1μs 3.35ns 13ns 0.157 0.00105 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.1μs 0.426ns 1.6ns 0.0136 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.54μs 0.558ns 2.01ns 0.0131 0 0 976 B
master CallElasticsearch net472 2.61μs 2.32ns 8.99ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.33μs 0.673ns 2.52ns 0.0133 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.59μs 0.777ns 3.01ns 0.0135 0 0 1.02 KB
master CallElasticsearchAsync net472 2.59μs 1.83ns 7.09ns 0.166 0 0 1.05 KB
#6546 CallElasticsearch net6.0 1.21μs 0.743ns 2.78ns 0.0133 0 0 976 B
#6546 CallElasticsearch netcoreapp3.1 1.56μs 0.716ns 2.68ns 0.0132 0 0 976 B
#6546 CallElasticsearch net472 2.57μs 1.97ns 7.39ns 0.157 0 0 995 B
#6546 CallElasticsearchAsync net6.0 1.28μs 0.859ns 3.22ns 0.0135 0 0 952 B
#6546 CallElasticsearchAsync netcoreapp3.1 1.65μs 0.339ns 1.27ns 0.0132 0 0 1.02 KB
#6546 CallElasticsearchAsync net472 2.52μs 2.22ns 8.61ns 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.31μs 0.723ns 2.7ns 0.0136 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.64μs 0.86ns 3.22ns 0.0132 0 0 952 B
master ExecuteAsync net472 1.79μs 0.453ns 1.7ns 0.145 0 0 915 B
#6546 ExecuteAsync net6.0 1.22μs 2.14ns 8ns 0.0129 0 0 952 B
#6546 ExecuteAsync netcoreapp3.1 1.64μs 0.883ns 3.3ns 0.0123 0 0 952 B
#6546 ExecuteAsync net472 1.87μs 0.782ns 2.82ns 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 2.44ns 9.43ns 0.0304 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.4μs 2.8ns 10.8ns 0.0377 0 0 2.85 KB
master SendAsync net472 7.41μs 2.09ns 8.11ns 0.493 0 0 3.12 KB
#6546 SendAsync net6.0 4.31μs 2.22ns 8.29ns 0.0325 0 0 2.31 KB
#6546 SendAsync netcoreapp3.1 5.36μs 3.04ns 10.5ns 0.0373 0 0 2.85 KB
#6546 SendAsync net472 7.34μs 2.69ns 10.4ns 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.5μs 0.722ns 2.7ns 0.0232 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.23μs 1.87ns 7ns 0.0221 0 0 1.64 KB
master EnrichedLog net472 2.71μs 1.12ns 4.33ns 0.249 0 0 1.57 KB
#6546 EnrichedLog net6.0 1.61μs 0.639ns 2.48ns 0.0233 0 0 1.64 KB
#6546 EnrichedLog netcoreapp3.1 2.19μs 0.504ns 1.89ns 0.0219 0 0 1.64 KB
#6546 EnrichedLog net472 2.8μs 1.02ns 3.96ns 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 312ns 1.21μs 0.0577 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 122μs 327ns 1.27μs 0 0 0 4.28 KB
master EnrichedLog net472 150μs 109ns 422ns 0.673 0.224 0 4.46 KB
#6546 EnrichedLog net6.0 118μs 314ns 1.21μs 0.0586 0 0 4.28 KB
#6546 EnrichedLog netcoreapp3.1 121μs 160ns 620ns 0 0 0 4.28 KB
#6546 EnrichedLog net472 152μs 122ns 472ns 0.681 0.227 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.08μs 1.23ns 4.75ns 0.0308 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.12μs 1.49ns 5.76ns 0.0289 0 0 2.2 KB
master EnrichedLog net472 4.79μs 0.967ns 3.75ns 0.321 0 0 2.02 KB
#6546 EnrichedLog net6.0 3.14μs 1.12ns 4.35ns 0.0313 0 0 2.2 KB
#6546 EnrichedLog netcoreapp3.1 4.19μs 2.23ns 8.36ns 0.0295 0 0 2.2 KB
#6546 EnrichedLog net472 4.93μs 1.14ns 4.28ns 0.318 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.46μs 0.971ns 3.5ns 0.016 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.73μs 0.991ns 3.84ns 0.0157 0 0 1.14 KB
master SendReceive net472 2.15μs 1.72ns 6.66ns 0.183 0 0 1.16 KB
#6546 SendReceive net6.0 1.34μs 0.614ns 2.38ns 0.0162 0 0 1.14 KB
#6546 SendReceive netcoreapp3.1 1.86μs 1.36ns 5.28ns 0.0148 0 0 1.14 KB
#6546 SendReceive net472 2.17μs 0.779ns 3.02ns 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.7μs 1.03ns 3.86ns 0.0218 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.87μs 1.98ns 6.85ns 0.0211 0 0 1.65 KB
master EnrichedLog net472 4.19μs 2.54ns 9.83ns 0.323 0 0 2.04 KB
#6546 EnrichedLog net6.0 2.74μs 1.06ns 4.09ns 0.0219 0 0 1.6 KB
#6546 EnrichedLog netcoreapp3.1 3.97μs 1.91ns 7.41ns 0.0217 0 0 1.65 KB
#6546 EnrichedLog net472 4.28μs 4.23ns 16.4ns 0.322 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6546

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.162 404.31 469.82

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 404ns 0.158ns 0.613ns 0.00811 0 0 576 B
master StartFinishSpan netcoreapp3.1 565ns 0.274ns 1.03ns 0.00785 0 0 576 B
master StartFinishSpan net472 709ns 0.226ns 0.875ns 0.0917 0 0 578 B
master StartFinishScope net6.0 541ns 0.393ns 1.52ns 0.00984 0 0 696 B
master StartFinishScope netcoreapp3.1 782ns 2.75ns 10.7ns 0.00953 0 0 696 B
master StartFinishScope net472 886ns 0.473ns 1.83ns 0.104 0 0 658 B
#6546 StartFinishSpan net6.0 470ns 0.284ns 1.1ns 0.00808 0 0 576 B
#6546 StartFinishSpan netcoreapp3.1 629ns 0.723ns 2.8ns 0.00783 0 0 576 B
#6546 StartFinishSpan net472 660ns 0.425ns 1.59ns 0.0915 0 0 578 B
#6546 StartFinishScope net6.0 529ns 0.426ns 1.65ns 0.00986 0 0 696 B
#6546 StartFinishScope netcoreapp3.1 758ns 0.43ns 1.66ns 0.00953 0 0 696 B
#6546 StartFinishScope net472 889ns 0.286ns 1.07ns 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 698ns 0.46ns 1.78ns 0.00971 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 903ns 0.504ns 1.95ns 0.00943 0 0 696 B
master RunOnMethodBegin net472 1.06μs 0.599ns 2.16ns 0.104 0 0 658 B
#6546 RunOnMethodBegin net6.0 708ns 0.229ns 0.887ns 0.00961 0 0 696 B
#6546 RunOnMethodBegin netcoreapp3.1 926ns 0.952ns 3.69ns 0.00917 0 0 696 B
#6546 RunOnMethodBegin net472 1.09μs 0.195ns 0.728ns 0.104 0 0 658 B

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants