Skip to content

Don't include the Datadog.Trace.BenchmarkDotNet NuGet in the release artifacts#5954

Merged
andrewlock merged 1 commit into
masterfrom
andrew/dont-publish-benchmarks-lib
Aug 28, 2024
Merged

Don't include the Datadog.Trace.BenchmarkDotNet NuGet in the release artifacts#5954
andrewlock merged 1 commit into
masterfrom
andrew/dont-publish-benchmarks-lib

Conversation

@andrewlock

@andrewlock andrewlock commented Aug 27, 2024

Copy link
Copy Markdown
Member

Summary of changes

Exclude the Datadog.Trace.BenchmarkDotNet NuGet package from the v3 release artifacts

Reason for change

The v3 version of Datadog.Trace.BenchmarkDotNet requires custom-only instrumentation... which doesn't work in v3. Rather than ship something which breaks at runtime, we'll hold off shipping this for now, and figure out our solution later. The v2 version continues to work, the package is not heavily used, and it shouldn't be used with auto-instrumentation anyway, so this seems like the best short-term solution.

Implementation details

Remove the NuGet from the release artifacts.

Test coverage

For this build I'll check that it's not in the release artifacts. Otherwise there's nothing else to do.

Other Details

Favouring this over #5953 for now to avoid any future issues with mixing version conflict stuff

@andrewlock andrewlock added area:builds project files, build scripts, pipelines, versioning, releases, packages area:ci-visibility labels Aug 27, 2024
@andrewlock
andrewlock requested a review from a team as a code owner August 27, 2024 16:05

@tonyredondo tonyredondo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@datadog-ddstaging

datadog-ddstaging Bot commented Aug 27, 2024

Copy link
Copy Markdown

Datadog Report

Branch report: andrew/dont-publish-benchmarks-lib
Commit report: 33421a2
Test service: dd-trace-dotnet

✅ 0 Failed, 302519 Passed, 1598 Skipped, 12h 15m 38.2s Total Time

@andrewlock

Copy link
Copy Markdown
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).

@andrewlock

Copy link
Copy Markdown
Member Author

Benchmarks Report for tracer 🐌

Benchmarks for #5954 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.262
  • 2 benchmarks are slower, with geometric mean 1.142
  • 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.68μs 42.5ns 272ns 0.0148 0.00738 0 5.43 KB
master StartStopWithChild netcoreapp3.1 9.91μs 52.5ns 273ns 0.0192 0.00962 0 5.62 KB
master StartStopWithChild net472 16μs 55.9ns 216ns 1.02 0.302 0.103 6.06 KB
#5954 StartStopWithChild net6.0 7.68μs 43.1ns 269ns 0.0151 0.00754 0 5.43 KB
#5954 StartStopWithChild netcoreapp3.1 9.77μs 53.4ns 307ns 0.0186 0.00928 0 5.63 KB
#5954 StartStopWithChild net472 16μs 39.4ns 153ns 1 0.29 0.0784 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 465μs 200ns 722ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 634μs 278ns 1.08μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 836μs 677ns 2.62μs 0.417 0 0 3.3 KB
#5954 WriteAndFlushEnrichedTraces net6.0 469μs 348ns 1.35μs 0 0 0 2.7 KB
#5954 WriteAndFlushEnrichedTraces netcoreapp3.1 642μs 304ns 1.18μs 0 0 0 2.7 KB
#5954 WriteAndFlushEnrichedTraces net472 836μs 636ns 2.46μs 0.414 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 192μs 1.11μs 9.5μs 0.182 0 0 18.45 KB
master SendRequest netcoreapp3.1 208μs 1.15μs 7.46μs 0.198 0 0 20.61 KB
master SendRequest net472 0.001ns 0.000448ns 0.00168ns 0 0 0 0 b
#5954 SendRequest net6.0 189μs 925ns 4.34μs 0.179 0 0 18.45 KB
#5954 SendRequest netcoreapp3.1 206μs 890ns 3.33μs 0.209 0 0 20.61 KB
#5954 SendRequest net472 0.00397ns 0.00111ns 0.00431ns 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 555μs 2.33μs 8.42μs 0.566 0 0 41.57 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 669μs 2.33μs 8.41μs 0.326 0 0 41.73 KB
master WriteAndFlushEnrichedTraces net472 852μs 2.35μs 9.1μs 8.39 2.52 0.419 53.3 KB
#5954 WriteAndFlushEnrichedTraces net6.0 551μs 2.94μs 15.3μs 0.553 0 0 41.69 KB
#5954 WriteAndFlushEnrichedTraces netcoreapp3.1 666μs 3.21μs 13.3μs 0.326 0 0 41.62 KB
#5954 WriteAndFlushEnrichedTraces net472 881μs 3.73μs 14.4μs 8.3 2.62 0.437 53.32 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.23μs 1.01ns 3.8ns 0.0146 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.73μs 1.47ns 5.71ns 0.0137 0 0 1.02 KB
master ExecuteNonQuery net472 1.98μs 1.89ns 7.31ns 0.157 0 0 987 B
#5954 ExecuteNonQuery net6.0 1.26μs 0.698ns 2.7ns 0.014 0 0 1.02 KB
#5954 ExecuteNonQuery netcoreapp3.1 1.65μs 1.04ns 4.03ns 0.0132 0 0 1.02 KB
#5954 ExecuteNonQuery net472 2.02μs 2.05ns 7.93ns 0.156 0 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.23μs 0.999ns 3.87ns 0.0135 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.63μs 0.555ns 2.15ns 0.013 0 0 976 B
master CallElasticsearch net472 2.43μs 1.72ns 6.66ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.38μs 1.31ns 4.91ns 0.0131 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.57μs 1.27ns 4.76ns 0.014 0 0 1.02 KB
master CallElasticsearchAsync net472 2.58μs 1.71ns 6.42ns 0.167 0 0 1.05 KB
#5954 CallElasticsearch net6.0 1.24μs 0.903ns 3.5ns 0.0137 0 0 976 B
#5954 CallElasticsearch netcoreapp3.1 1.61μs 0.595ns 2.31ns 0.0136 0 0 976 B
#5954 CallElasticsearch net472 2.39μs 1.86ns 7.19ns 0.158 0.00119 0 995 B
#5954 CallElasticsearchAsync net6.0 1.29μs 1.02ns 3.97ns 0.013 0 0 952 B
#5954 CallElasticsearchAsync netcoreapp3.1 1.64μs 2.01ns 6.95ns 0.0139 0 0 1.02 KB
#5954 CallElasticsearchAsync net472 2.49μs 1.78ns 6.88ns 0.166 0.00125 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5954

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑netcoreapp3.1 1.123 1,547.53 1,738.45

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.26μs 0.661ns 2.47ns 0.0133 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.55μs 0.555ns 2ns 0.0131 0 0 952 B
master ExecuteAsync net472 1.78μs 1.47ns 5.71ns 0.145 0 0 915 B
#5954 ExecuteAsync net6.0 1.27μs 1ns 3.75ns 0.0133 0 0 952 B
#5954 ExecuteAsync netcoreapp3.1 1.74μs 0.722ns 2.7ns 0.013 0 0 952 B
#5954 ExecuteAsync net472 1.76μs 1.2ns 4.65ns 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.21μs 2.09ns 8.11ns 0.0315 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.09μs 2.27ns 8.81ns 0.0358 0 0 2.76 KB
master SendAsync net472 7.75μs 3.24ns 12.6ns 0.499 0 0 3.15 KB
#5954 SendAsync net6.0 4.31μs 1.02ns 3.82ns 0.0302 0 0 2.22 KB
#5954 SendAsync netcoreapp3.1 5.1μs 1.6ns 6.2ns 0.0378 0 0 2.76 KB
#5954 SendAsync net472 7.86μs 2.5ns 9.7ns 0.498 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.48μs 0.708ns 2.65ns 0.023 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.38μs 1.1ns 4.12ns 0.0217 0 0 1.64 KB
master EnrichedLog net472 2.68μs 1.93ns 7.24ns 0.249 0 0 1.57 KB
#5954 EnrichedLog net6.0 1.5μs 0.461ns 1.73ns 0.023 0 0 1.64 KB
#5954 EnrichedLog netcoreapp3.1 2.27μs 0.862ns 3.34ns 0.0215 0 0 1.64 KB
#5954 EnrichedLog net472 2.73μs 2.7ns 10.5ns 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 116μs 166ns 621ns 0.0578 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 119μs 234ns 905ns 0 0 0 4.28 KB
master EnrichedLog net472 148μs 225ns 872ns 0.668 0.223 0 4.46 KB
#5954 EnrichedLog net6.0 114μs 201ns 779ns 0.0574 0 0 4.28 KB
#5954 EnrichedLog netcoreapp3.1 120μs 202ns 755ns 0 0 0 4.28 KB
#5954 EnrichedLog net472 146μs 141ns 544ns 0.659 0.22 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.95μs 1.62ns 6.26ns 0.0313 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.09μs 1.07ns 4.01ns 0.0286 0 0 2.2 KB
master EnrichedLog net472 4.78μs 2.91ns 11.3ns 0.319 0 0 2.02 KB
#5954 EnrichedLog net6.0 2.98μs 0.657ns 2.46ns 0.0298 0 0 2.2 KB
#5954 EnrichedLog netcoreapp3.1 4.38μs 2.33ns 9.01ns 0.0285 0 0 2.2 KB
#5954 EnrichedLog net472 4.84μs 1.33ns 4.98ns 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.37μs 0.604ns 2.34ns 0.0164 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.76μs 1.38ns 5.35ns 0.0149 0 0 1.14 KB
master SendReceive net472 2.18μs 1.64ns 5.9ns 0.184 0.00109 0 1.16 KB
#5954 SendReceive net6.0 1.3μs 0.492ns 1.77ns 0.0156 0 0 1.14 KB
#5954 SendReceive netcoreapp3.1 1.79μs 1.24ns 4.82ns 0.0153 0 0 1.14 KB
#5954 SendReceive net472 2.24μs 3.88ns 15ns 0.183 0.00113 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.997ns 3.86ns 0.0225 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.92μs 1.92ns 7.43ns 0.0217 0 0 1.65 KB
master EnrichedLog net472 4.36μs 2.83ns 11ns 0.324 0 0 2.04 KB
#5954 EnrichedLog net6.0 2.79μs 1.32ns 5.1ns 0.0224 0 0 1.6 KB
#5954 EnrichedLog netcoreapp3.1 3.82μs 1.44ns 5.37ns 0.0211 0 0 1.65 KB
#5954 EnrichedLog net472 4.3μs 2.62ns 9.81ns 0.324 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5954

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.161 396.03 459.78

Faster 🎉 in #5954

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.262 605.08 479.36

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 396ns 0.124ns 0.463ns 0.00819 0 0 576 B
master StartFinishSpan netcoreapp3.1 606ns 0.414ns 1.6ns 0.00788 0 0 576 B
master StartFinishSpan net472 630ns 0.601ns 2.33ns 0.0918 0 0 578 B
master StartFinishScope net6.0 605ns 0.291ns 1.13ns 0.0097 0 0 696 B
master StartFinishScope netcoreapp3.1 717ns 0.508ns 1.97ns 0.00972 0 0 696 B
master StartFinishScope net472 841ns 0.845ns 3.27ns 0.104 0 0 658 B
#5954 StartFinishSpan net6.0 460ns 0.183ns 0.66ns 0.00811 0 0 576 B
#5954 StartFinishSpan netcoreapp3.1 570ns 0.342ns 1.28ns 0.0077 0 0 576 B
#5954 StartFinishSpan net472 606ns 2.76ns 10.3ns 0.0916 0 0 578 B
#5954 StartFinishScope net6.0 480ns 0.273ns 0.986ns 0.00986 0 0 696 B
#5954 StartFinishScope netcoreapp3.1 654ns 0.253ns 0.948ns 0.00945 0 0 696 B
#5954 StartFinishScope net472 787ns 1.38ns 5.18ns 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 579ns 0.354ns 1.37ns 0.00966 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 922ns 1.08ns 4.02ns 0.00931 0 0 696 B
master RunOnMethodBegin net472 1.05μs 0.801ns 3.1ns 0.104 0 0 658 B
#5954 RunOnMethodBegin net6.0 643ns 0.821ns 3.18ns 0.00962 0 0 696 B
#5954 RunOnMethodBegin netcoreapp3.1 892ns 0.563ns 2.18ns 0.00945 0 0 696 B
#5954 RunOnMethodBegin net472 1.15μs 3.66ns 14.2ns 0.104 0 0 658 B

@andrewlock

Copy link
Copy Markdown
Member Author

Throughput/Crank Report ⚡

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 (5954) (11.641M)   : 0, 11641357
    master (11.520M)   : 0, 11519779
    benchmarks/2.9.0 (11.711M)   : 0, 11710619

    section Automatic
    This PR (5954) (7.742M)   : 0, 7741769
    master (7.709M)   : 0, 7708983
    benchmarks/2.9.0 (8.265M)   : 0, 8264630

    section Trace stats
    master (8.193M)   : 0, 8193446

    section Manual
    master (11.640M)   : 0, 11639960

    section Manual + Automatic
    This PR (5954) (7.151M)   : 0, 7151018
    master (7.226M)   : 0, 7225653

    section DD_TRACE_ENABLED=0
    master (10.753M)   : 0, 10752649

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5954) (9.569M)   : 0, 9569278
    master (9.579M)   : 0, 9579469
    benchmarks/2.9.0 (9.717M)   : 0, 9716586

    section Automatic
    This PR (5954) (6.508M)   : 0, 6507838
    master (6.605M)   : 0, 6604556

    section Trace stats
    master (6.804M)   : 0, 6804363

    section Manual
    master (9.548M)   : 0, 9547503

    section Manual + Automatic
    This PR (5954) (6.144M)   : 0, 6144334
    master (6.038M)   : 0, 6038193

    section DD_TRACE_ENABLED=0
    master (8.884M)   : 0, 8883941

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5954) (10.410M)   : 0, 10409919

    section Automatic
    This PR (5954) (6.787M)   : 0, 6787381

    section Manual + Automatic
    This PR (5954) (6.300M)   : 0, 6300309

Loading

@andrewlock
andrewlock merged commit 009c689 into master Aug 28, 2024
@andrewlock
andrewlock deleted the andrew/dont-publish-benchmarks-lib branch August 28, 2024 09:40
@github-actions github-actions Bot added this to the vNext-v3 milestone Aug 28, 2024
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:ci-visibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants