Skip to content

Set CI variables to increase performance #6933

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

Merged
merged 7 commits into from
May 8, 2025

Conversation

NachoEchevarria
Copy link
Contributor

@NachoEchevarria NachoEchevarria commented May 7, 2025

Summary of changes

These variables can be set to increase builds and ensure a consistent behavior:

Skip first-time experience for quicker startup
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
Disable telemetry to reduce overhead
DOTNET_CLI_TELEMETRY_OPTOUT=1
Disable the SDK from picking up a global install
DOTNET_MULTILEVEL_LOOKUP=0
Set CLI language to English for consistent logs
DOTNET_CLI_UI_LANGUAGE="en"
Skip the extraction of XML documentation files in nugets
NUGET_XMLDOC_MODE: 'skip'
Skips the generation of HTTPS development certificates.
DOTNET_GENERATE_ASPNET_CERTIFICATE: false

These variables were set in some parts of the pipeline. In this PR, the variables are set in the main pipeline to ensure that all stages and jobs apply them in the pipeline. For instance this kind of tasks:

      - task: DotNetCoreCLI@2
      inputs:
        command: 'build'
        arguments: '-c Release -f $(framework) -p:Platform=x64 -p:CheckEolTargetFramework=false'
        workingDirectory: $(System.DefaultWorkingDirectory)/profiler/src/Demos/Samples.$(sampleName)
      displayName: 'dotnet build Release x64 $(sampleName)'

These values are not automatically set on docker containers, so dockerfiles have been modified to add them all. While scripts should inherit them when run from the pipeline, these have been also been updated because they might be run from a non CI environment.

Reason for change

Implementation details

Test coverage

Other details

@andrewlock
Copy link
Member

andrewlock commented May 7, 2025

Benchmarks Report for tracer 🐌

Benchmarks for #6933 compared to master:

  • 5 benchmarks are faster, with geometric mean 1.377
  • 1 benchmarks are slower, with geometric mean 1.127
  • 1 benchmarks have more 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 ✔️ More allocations ⚠️

More allocations ⚠️ in #6933

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.11 KB 6.16 KB 45 B 0.74%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.95μs 141ns 1.41μs 0 0 0 5.55 KB
master StartStopWithChild netcoreapp3.1 8.98μs 32.1ns 116ns 0 0 0 5.74 KB
master StartStopWithChild net472 15.1μs 78.4ns 400ns 1.08 0.432 0.144 6.11 KB
#6933 StartStopWithChild net6.0 7.13μs 56.1ns 517ns 0 0 0 5.57 KB
#6933 StartStopWithChild netcoreapp3.1 10.6μs 125ns 1.25μs 0.0455 0 0 5.77 KB
#6933 StartStopWithChild net472 14.8μs 78.2ns 399ns 1.03 0.318 0.0794 6.16 KB
Benchmarks.Trace.AgentWriterBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6933

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 2.100 1,049,792.19 499,846.59

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 1.04ms 4.78μs 18.5μs 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 658μs 561ns 2.17μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 858μs 650ns 2.52μs 0 0 0 3.31 KB
#6933 WriteAndFlushEnrichedTraces net6.0 501μs 1.11μs 4.01μs 0 0 0 2.71 KB
#6933 WriteAndFlushEnrichedTraces netcoreapp3.1 671μs 2.02μs 7.84μs 0 0 0 2.7 KB
#6933 WriteAndFlushEnrichedTraces net472 847μs 590ns 2.29μs 0 0 0 3.31 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 135μs 784ns 6.74μs 0 0 0 14.48 KB
master SendRequest netcoreapp3.1 150μs 720ns 2.79μs 0 0 0 17.28 KB
master SendRequest net472 0.00117ns 0.000629ns 0.00244ns 0 0 0 0 b
#6933 SendRequest net6.0 134μs 579ns 2.46μs 0 0 0 14.48 KB
#6933 SendRequest netcoreapp3.1 151μs 720ns 2.79μs 0 0 0 17.28 KB
#6933 SendRequest net472 0.00188ns 0.000736ns 0.00266ns 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 548μs 2.52μs 9.75μs 0 0 0 41.57 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 648μs 2.11μs 7.59μs 0 0 0 41.77 KB
master WriteAndFlushEnrichedTraces net472 879μs 6.29μs 62.9μs 7.81 0 0 53.44 KB
#6933 WriteAndFlushEnrichedTraces net6.0 546μs 1.7μs 5.87μs 0 0 0 41.72 KB
#6933 WriteAndFlushEnrichedTraces netcoreapp3.1 661μs 3.64μs 21.2μs 0 0 0 41.78 KB
#6933 WriteAndFlushEnrichedTraces net472 869μs 5.03μs 43μs 4.46 0 0 53.59 KB
Benchmarks.Trace.DbCommandBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6933

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑netcoreapp3.1 1.587 2,907.66 1,832.40

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.41μs 7.58ns 46.1ns 0.00923 0 0 1.03 KB
master ExecuteNonQuery netcoreapp3.1 2.91μs 3.89ns 13.5ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.1μs 3.9ns 15.1ns 0.148 0.0106 0 995 B
#6933 ExecuteNonQuery net6.0 1.41μs 6.29ns 23.5ns 0.014 0 0 1.03 KB
#6933 ExecuteNonQuery netcoreapp3.1 1.84μs 3.43ns 11.9ns 0.00911 0 0 1.02 KB
#6933 ExecuteNonQuery net472 2.08μs 3.61ns 14ns 0.156 0.0104 0 995 B
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6933

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 1.118 1,387.37 1,241.12

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.23μs 0.849ns 3.29ns 0.0122 0 0 984 B
master CallElasticsearch netcoreapp3.1 1.56μs 0.675ns 2.43ns 0.00793 0 0 984 B
master CallElasticsearch net472 2.41μs 1.16ns 4.48ns 0.159 0 0 1 KB
master CallElasticsearchAsync net6.0 1.39μs 0.847ns 3.28ns 0.0137 0 0 960 B
master CallElasticsearchAsync netcoreapp3.1 1.61μs 2.3ns 8.61ns 0.00806 0 0 1.03 KB
master CallElasticsearchAsync net472 2.67μs 1.09ns 4.08ns 0.161 0 0 1.06 KB
#6933 CallElasticsearch net6.0 1.28μs 0.854ns 3.31ns 0.0128 0 0 984 B
#6933 CallElasticsearch netcoreapp3.1 1.54μs 1.12ns 4.17ns 0.00774 0 0 984 B
#6933 CallElasticsearch net472 2.47μs 1.61ns 6.02ns 0.148 0 0 1 KB
#6933 CallElasticsearchAsync net6.0 1.24μs 1.1ns 4.25ns 0.0124 0 0 960 B
#6933 CallElasticsearchAsync netcoreapp3.1 1.62μs 3.13ns 11.7ns 0.0084 0 0 1.03 KB
#6933 CallElasticsearchAsync net472 2.69μs 1.8ns 6.74ns 0.162 0 0 1.06 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.35μs 1.41ns 5.46ns 0.0134 0 0 960 B
master ExecuteAsync netcoreapp3.1 1.64μs 8.7ns 45.2ns 0.00813 0 0 960 B
master ExecuteAsync net472 1.77μs 1.02ns 3.83ns 0.142 0 0 923 B
#6933 ExecuteAsync net6.0 1.3μs 0.426ns 1.53ns 0.013 0 0 960 B
#6933 ExecuteAsync netcoreapp3.1 1.65μs 1.15ns 4.47ns 0.00833 0 0 960 B
#6933 ExecuteAsync net472 1.77μs 0.811ns 3.14ns 0.142 0 0 923 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.39μs 3.18ns 12.3ns 0.022 0 0 2.32 KB
master SendAsync netcoreapp3.1 5.2μs 5.02ns 18.1ns 0.0259 0 0 2.86 KB
master SendAsync net472 7.42μs 2.74ns 10.3ns 0.482 0 0 3.13 KB
#6933 SendAsync net6.0 4.27μs 2.68ns 10.4ns 0.0213 0 0 2.32 KB
#6933 SendAsync netcoreapp3.1 5.32μs 9.31ns 33.6ns 0.0266 0 0 2.86 KB
#6933 SendAsync net472 7.51μs 6.89ns 26.7ns 0.487 0 0 3.13 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.56μs 1.45ns 5.01ns 0.0236 0 0 1.71 KB
master EnrichedLog netcoreapp3.1 2.41μs 4.06ns 14ns 0.012 0 0 1.71 KB
master EnrichedLog net472 2.66μs 2.48ns 9.26ns 0.251 0 0 1.64 KB
#6933 EnrichedLog net6.0 1.48μs 0.547ns 1.9ns 0.0223 0 0 1.71 KB
#6933 EnrichedLog netcoreapp3.1 2.19μs 5.69ns 21.3ns 0.0219 0 0 1.71 KB
#6933 EnrichedLog net472 2.55μs 1ns 3.74ns 0.254 0 0 1.64 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 575ns 2.64μs 0 0 0 4.32 KB
master EnrichedLog netcoreapp3.1 119μs 364ns 1.41μs 0 0 0 4.32 KB
master EnrichedLog net472 153μs 226ns 875ns 0 0 0 4.51 KB
#6933 EnrichedLog net6.0 111μs 158ns 612ns 0 0 0 4.32 KB
#6933 EnrichedLog netcoreapp3.1 116μs 262ns 978ns 0 0 0 4.32 KB
#6933 EnrichedLog net472 150μs 141ns 546ns 0 0 0 4.51 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.02μs 2.92ns 11.3ns 0.0303 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 4.35μs 3.58ns 13.4ns 0 0 0 2.26 KB
master EnrichedLog net472 4.82μs 2.86ns 10.7ns 0.312 0 0 2.09 KB
#6933 EnrichedLog net6.0 3.05μs 2.48ns 9.62ns 0.0305 0 0 2.26 KB
#6933 EnrichedLog netcoreapp3.1 4.34μs 3.93ns 15.2ns 0.0217 0 0 2.26 KB
#6933 EnrichedLog net472 4.83μs 2.76ns 10.7ns 0.313 0 0 2.09 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.41μs 1.13ns 4.24ns 0.0143 0 0 1.15 KB
master SendReceive netcoreapp3.1 1.82μs 3.01ns 11.7ns 0.00885 0 0 1.15 KB
master SendReceive net472 2.1μs 1.9ns 7.35ns 0.176 0 0 1.16 KB
#6933 SendReceive net6.0 1.32μs 0.817ns 3.16ns 0.0131 0 0 1.15 KB
#6933 SendReceive netcoreapp3.1 1.81μs 1.32ns 4.59ns 0.00896 0 0 1.15 KB
#6933 SendReceive net472 2.07μs 1.02ns 3.93ns 0.184 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.79μs 1.95ns 7.55ns 0.0139 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 3.91μs 4.34ns 16.8ns 0.0197 0 0 1.69 KB
master EnrichedLog net472 4.45μs 4.87ns 18.2ns 0.31 0 0 2.08 KB
#6933 EnrichedLog net6.0 2.76μs 1.24ns 4.64ns 0.0137 0 0 1.64 KB
#6933 EnrichedLog netcoreapp3.1 3.87μs 3.41ns 13.2ns 0.0192 0 0 1.69 KB
#6933 EnrichedLog net472 4.51μs 1.92ns 7.18ns 0.314 0 0 2.08 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6933

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472 1.127 778.05 876.48

Faster 🎉 in #6933

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.163 462.98 398.08

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 463ns 0.23ns 0.83ns 0.00687 0 0 584 B
master StartFinishSpan netcoreapp3.1 569ns 0.309ns 1.15ns 0.00569 0 0 584 B
master StartFinishSpan net472 656ns 0.434ns 1.68ns 0.0922 0 0 586 B
master StartFinishScope net6.0 508ns 0.461ns 1.79ns 0.0101 0 0 704 B
master StartFinishScope netcoreapp3.1 681ns 0.641ns 2.4ns 0.00682 0 0 704 B
master StartFinishScope net472 779ns 0.282ns 1.09ns 0.105 0 0 666 B
#6933 StartFinishSpan net6.0 398ns 0.154ns 0.575ns 0.00798 0 0 584 B
#6933 StartFinishSpan netcoreapp3.1 559ns 0.318ns 1.19ns 0.00564 0 0 584 B
#6933 StartFinishSpan net472 629ns 0.297ns 1.11ns 0.0916 0 0 586 B
#6933 StartFinishScope net6.0 490ns 0.402ns 1.45ns 0.00978 0 0 704 B
#6933 StartFinishScope netcoreapp3.1 735ns 0.631ns 2.36ns 0.00749 0 0 704 B
#6933 StartFinishScope net472 876ns 0.285ns 1.11ns 0.106 0 0 666 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6933

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.142 674.09 590.17

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 674ns 0.586ns 2.27ns 0.0101 0 0 704 B
master RunOnMethodBegin netcoreapp3.1 951ns 0.877ns 3.28ns 0.00948 0 0 704 B
master RunOnMethodBegin net472 1.04μs 0.588ns 2.28ns 0.104 0 0 666 B
#6933 RunOnMethodBegin net6.0 590ns 0.356ns 1.33ns 0.00888 0 0 704 B
#6933 RunOnMethodBegin netcoreapp3.1 903ns 0.931ns 3.36ns 0.00901 0 0 704 B
#6933 RunOnMethodBegin net472 1.07μs 0.306ns 1.14ns 0.102 0 0 666 B

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented May 7, 2025

Datadog Report

All test runs f1a8b99 🔗

2 Total Test Services: 0 Failed, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Test Service View
dd-trace-dotnet 0 0 0 249891 2270 17h 44m 36.23s Link
exploration_tests 0 0 0 22085 3 2m 10.46s Link

@andrewlock
Copy link
Member

andrewlock commented May 7, 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.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6933) - mean (68ms)  : 66, 71
     .   : milestone, 68,
    master - mean (69ms)  : 66, 72
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6933) - mean (1,007ms)  : 978, 1035
     .   : milestone, 1007,
    master - mean (1,009ms)  : 985, 1034
     .   : milestone, 1009,

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

    section CallTarget+Inlining+NGEN
    This PR (6933) - mean (693ms)  : 674, 712
     .   : milestone, 693,
    master - mean (697ms)  : 681, 714
     .   : milestone, 697,

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

    section CallTarget+Inlining+NGEN
    This PR (6933) - mean (655ms)  : 639, 671
     .   : milestone, 655,
    master - mean (656ms)  : 635, 677
     .   : milestone, 656,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6933) - mean (190ms)  : 185, 195
     .   : milestone, 190,
    master - mean (191ms)  : 184, 197
     .   : milestone, 191,

    section CallTarget+Inlining+NGEN
    This PR (6933) - mean (1,111ms)  : 1087, 1135
     .   : milestone, 1111,
    master - mean (1,110ms)  : 1084, 1136
     .   : milestone, 1110,

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

    section CallTarget+Inlining+NGEN
    This PR (6933) - mean (883ms)  : 852, 914
     .   : milestone, 883,
    master - mean (881ms)  : 848, 914
     .   : milestone, 881,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6933) - mean (262ms)  : 259, 266
     .   : milestone, 262,
    master - mean (261ms)  : 257, 265
     .   : milestone, 261,

    section CallTarget+Inlining+NGEN
    This PR (6933) - mean (873ms)  : 845, 902
     .   : milestone, 873,
    master - mean (869ms)  : 837, 901
     .   : milestone, 869,

Loading

@NachoEchevarria NachoEchevarria changed the title Nacho/performance variables set Set CI variables to increase performance May 7, 2025
@pr-commenter
Copy link

pr-commenter bot commented May 7, 2025

Benchmarks

Benchmarks Report for tracer 🐌

Benchmarks for #6933 compared to master:

  • All benchmarks have the same speed
  • 2 benchmarks have fewer 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 ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #6933

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.21 KB 6.06 KB -142 B -2.29%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.6μs 60ns 416ns 0 0 0 5.56 KB
master StartStopWithChild netcoreapp3.1 14.2μs 73.2ns 366ns 0 0 0 5.72 KB
master StartStopWithChild net472 22.7μs 124ns 756ns 0.904 0.226 0 6.21 KB
#6933 StartStopWithChild net6.0 10.7μs 58.5ns 346ns 0 0 0 5.54 KB
#6933 StartStopWithChild netcoreapp3.1 13.3μs 70.2ns 344ns 0 0 0 5.74 KB
#6933 StartStopWithChild net472 22.4μs 125ns 770ns 1.07 0.428 0.107 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 937μs 55.1ns 199ns 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.03ms 78.5ns 283ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.23ms 850ns 3.29μs 0 0 0 3.31 KB
#6933 WriteAndFlushEnrichedTraces net6.0 941μs 127ns 477ns 0 0 0 2.71 KB
#6933 WriteAndFlushEnrichedTraces netcoreapp3.1 1.01ms 89.5ns 323ns 0 0 0 2.7 KB
#6933 WriteAndFlushEnrichedTraces net472 1.23ms 609ns 2.36μs 0 0 0 3.31 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 61μs 96.2ns 347ns 0 0 0 14.53 KB
master SendRequest netcoreapp3.1 70.5μs 157ns 544ns 0 0 0 17.42 KB
master SendRequest net472 0.0178ns 0.00489ns 0.0189ns 0 0 0 0 b
#6933 SendRequest net6.0 61.5μs 47.2ns 183ns 0 0 0 14.53 KB
#6933 SendRequest netcoreapp3.1 71.6μs 365ns 1.67μs 0 0 0 17.42 KB
#6933 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #6933

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 42.54 KB 41.95 KB -594 B -1.40%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 706μs 1.16μs 4.5μs 0 0 0 41.59 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 769μs 4.37μs 31.2μs 0 0 0 42.54 KB
master WriteAndFlushEnrichedTraces net472 868μs 2.47μs 8.92μs 8.33 0 0 56.36 KB
#6933 WriteAndFlushEnrichedTraces net6.0 709μs 409ns 1.58μs 0 0 0 41.77 KB
#6933 WriteAndFlushEnrichedTraces netcoreapp3.1 697μs 4μs 30.4μs 0 0 0 41.95 KB
#6933 WriteAndFlushEnrichedTraces net472 897μs 4.36μs 17.4μs 4.46 0 0 56.11 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 2.09μs 8.62ns 33.4ns 0 0 0 1.03 KB
master ExecuteNonQuery netcoreapp3.1 2.53μs 8.98ns 34.8ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.78μs 2.45ns 9.49ns 0.153 0.0139 0 995 B
#6933 ExecuteNonQuery net6.0 2.04μs 2.59ns 10ns 0 0 0 1.03 KB
#6933 ExecuteNonQuery netcoreapp3.1 2.49μs 2.52ns 9.43ns 0 0 0 1.02 KB
#6933 ExecuteNonQuery net472 2.79μs 3.55ns 13.7ns 0.154 0.014 0 995 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.8μs 6.35ns 23.8ns 0 0 0 1.04 KB
master CallElasticsearch netcoreapp3.1 2.26μs 10.5ns 40.5ns 0 0 0 1.04 KB
master CallElasticsearch net472 3.56μs 2.3ns 8.29ns 0.161 0 0 1.05 KB
master CallElasticsearchAsync net6.0 1.82μs 4.48ns 16.8ns 0 0 0 1.02 KB
master CallElasticsearchAsync netcoreapp3.1 2.31μs 10.1ns 39.1ns 0 0 0 1.09 KB
master CallElasticsearchAsync net472 3.59μs 1.84ns 7.13ns 0.162 0 0 1.11 KB
#6933 CallElasticsearch net6.0 1.77μs 3.46ns 13.4ns 0 0 0 1.04 KB
#6933 CallElasticsearch netcoreapp3.1 2.34μs 9.79ns 37.9ns 0 0 0 1.04 KB
#6933 CallElasticsearch net472 3.55μs 2.74ns 10.6ns 0.159 0 0 1.05 KB
#6933 CallElasticsearchAsync net6.0 1.86μs 1.79ns 6.46ns 0 0 0 1.02 KB
#6933 CallElasticsearchAsync netcoreapp3.1 2.39μs 8.68ns 33.6ns 0 0 0 1.09 KB
#6933 CallElasticsearchAsync net472 3.6μs 3.1ns 10.7ns 0.162 0 0 1.11 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.9μs 6.95ns 26.9ns 0 0 0 960 B
master ExecuteAsync netcoreapp3.1 2.39μs 11ns 42.6ns 0 0 0 960 B
master ExecuteAsync net472 2.58μs 7.02ns 27.2ns 0.144 0 0 923 B
#6933 ExecuteAsync net6.0 1.87μs 9.31ns 38.4ns 0 0 0 960 B
#6933 ExecuteAsync netcoreapp3.1 2.39μs 4.56ns 17.7ns 0 0 0 960 B
#6933 ExecuteAsync net472 2.54μs 3.24ns 12.5ns 0.14 0 0 923 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 6.88μs 9.66ns 37.4ns 0 0 0 2.37 KB
master SendAsync netcoreapp3.1 8.43μs 36.2ns 140ns 0 0 0 2.9 KB
master SendAsync net472 12.2μs 4.02ns 14.5ns 0.488 0 0 3.19 KB
#6933 SendAsync net6.0 6.86μs 5.58ns 20.9ns 0 0 0 2.37 KB
#6933 SendAsync netcoreapp3.1 8.19μs 25.3ns 98.1ns 0 0 0 2.9 KB
#6933 SendAsync net472 12.2μs 3.59ns 13.4ns 0.487 0 0 3.19 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 2.64μs 13ns 51.9ns 0 0 0 1.76 KB
master EnrichedLog netcoreapp3.1 3.46μs 18.1ns 87ns 0 0 0 1.76 KB
master EnrichedLog net472 3.98μs 3.47ns 13.4ns 0.259 0 0 1.69 KB
#6933 EnrichedLog net6.0 2.59μs 13.9ns 70.7ns 0 0 0 1.76 KB
#6933 EnrichedLog netcoreapp3.1 3.42μs 5.58ns 21.6ns 0 0 0 1.76 KB
#6933 EnrichedLog net472 3.84μs 3.21ns 12.4ns 0.268 0 0 1.69 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 122μs 45.5ns 164ns 0 0 0 4.37 KB
master EnrichedLog netcoreapp3.1 131μs 620ns 2.4μs 0 0 0 4.37 KB
master EnrichedLog net472 168μs 340ns 1.32μs 0 0 0 4.57 KB
#6933 EnrichedLog net6.0 123μs 54.5ns 197ns 0 0 0 4.37 KB
#6933 EnrichedLog netcoreapp3.1 129μs 444ns 1.6μs 0 0 0 4.37 KB
#6933 EnrichedLog net472 166μs 170ns 635ns 0 0 0 4.57 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 5.16μs 4.51ns 16.9ns 0 0 0 2.32 KB
master EnrichedLog netcoreapp3.1 6.58μs 14.9ns 57.6ns 0 0 0 2.32 KB
master EnrichedLog net472 7.36μs 7.51ns 28.1ns 0.33 0 0 2.14 KB
#6933 EnrichedLog net6.0 4.98μs 19.8ns 76.9ns 0 0 0 2.32 KB
#6933 EnrichedLog netcoreapp3.1 6.61μs 20.3ns 78.7ns 0 0 0 2.32 KB
#6933 EnrichedLog net472 7.31μs 9.89ns 38.3ns 0.329 0 0 2.14 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 2.04μs 0.788ns 2.84ns 0 0 0 1.21 KB
master SendReceive netcoreapp3.1 2.61μs 10.4ns 40.4ns 0 0 0 1.21 KB
master SendReceive net472 3.14μs 1.67ns 6.45ns 0.188 0 0 1.21 KB
#6933 SendReceive net6.0 2.02μs 3.34ns 13ns 0 0 0 1.21 KB
#6933 SendReceive netcoreapp3.1 2.55μs 12.8ns 60.1ns 0 0 0 1.21 KB
#6933 SendReceive net472 3.08μs 5.32ns 20.6ns 0.187 0 0 1.21 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 4.17μs 13.2ns 49.2ns 0 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 5.77μs 12ns 46.6ns 0 0 0 1.69 KB
master EnrichedLog net472 6.62μs 8.54ns 33.1ns 0.329 0 0 2.08 KB
#6933 EnrichedLog net6.0 4.22μs 13.4ns 51.8ns 0 0 0 1.64 KB
#6933 EnrichedLog netcoreapp3.1 5.76μs 11.9ns 46.2ns 0 0 0 1.69 KB
#6933 EnrichedLog net472 6.6μs 5.31ns 20.5ns 0.328 0 0 2.08 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 758ns 3.92ns 18ns 0 0 0 584 B
master StartFinishSpan netcoreapp3.1 947ns 4.74ns 22.2ns 0 0 0 584 B
master StartFinishSpan net472 923ns 0.0955ns 0.37ns 0.0924 0 0 586 B
master StartFinishScope net6.0 898ns 1.72ns 6.66ns 0 0 0 704 B
master StartFinishScope netcoreapp3.1 1.16μs 5.63ns 22.5ns 0 0 0 704 B
master StartFinishScope net472 1.1μs 0.266ns 0.995ns 0.106 0 0 666 B
#6933 StartFinishSpan net6.0 739ns 3.86ns 18.1ns 0 0 0 584 B
#6933 StartFinishSpan netcoreapp3.1 939ns 4.75ns 22.3ns 0 0 0 584 B
#6933 StartFinishSpan net472 919ns 0.335ns 1.3ns 0.0919 0 0 586 B
#6933 StartFinishScope net6.0 909ns 0.453ns 1.75ns 0 0 0 704 B
#6933 StartFinishScope netcoreapp3.1 1.16μs 5.83ns 26.7ns 0 0 0 704 B
#6933 StartFinishScope net472 1.13μs 1.53ns 5.93ns 0.101 0 0 666 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 1.04μs 5.06ns 20.9ns 0 0 0 704 B
master RunOnMethodBegin netcoreapp3.1 1.41μs 6.7ns 26ns 0 0 0 704 B
master RunOnMethodBegin net472 1.41μs 0.718ns 2.78ns 0.104 0 0 666 B
#6933 RunOnMethodBegin net6.0 1.05μs 5.33ns 21.3ns 0 0 0 704 B
#6933 RunOnMethodBegin netcoreapp3.1 1.39μs 6.6ns 25.5ns 0 0 0 704 B
#6933 RunOnMethodBegin net472 1.4μs 1.39ns 5.37ns 0.0989 0 0 666 B

@NachoEchevarria NachoEchevarria marked this pull request as ready for review May 8, 2025 08:17
@NachoEchevarria NachoEchevarria requested review from a team as code owners May 8, 2025 08:17
DOTNET_NOLOGO=true \
DOTNET_NOLOGO=1 \
# Skip first-time experience for quicker startup
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 \
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should set this here. The point of the first-time experience is that dotnet does some things ahead of time, to speed up things for subsequent runs. We pre-build these docker images, so the first-time experience should be run.

That's why we currently call dotnet help after installing .NET, to trigger the first-time experience. If that's not working, we should see about running dotnet new console (and removing it again) or something like that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. Thank you!

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!

@NachoEchevarria NachoEchevarria merged commit 7de9047 into master May 8, 2025
129 of 130 checks passed
@NachoEchevarria NachoEchevarria deleted the nacho/PerformanceVariablesSet branch May 8, 2025 13:28
@github-actions github-actions bot added this to the vNext-v3 milestone May 8, 2025
@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label May 23, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants