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

Report IsServerBuild correctly #5730

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

Conversation

andrewlock
Copy link
Member

Summary of changes

Fixes IsServerBuild calculation in CI

Reason for change

It wasn't working correctly, e.g. here

Implementation details

Passes the TF_BUILD env var through to docker builds to ensure

Test coverage

Tested in a build here and looks correct (it's running the snapshot stage in CI)

Other details

@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Jun 24, 2024
@andrewlock andrewlock requested a review from a team as a code owner June 24, 2024 11:49
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jun 24, 2024

Datadog Report

Branch report: andrew/ci/report-is-server-build-correctly
Commit report: 50bec76
Test service: dd-trace-dotnet

✅ 0 Failed, 142182 Passed, 722 Skipped, 8h 43m 2.47s Total Time

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

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5730) - mean (77ms)  : 70, 84
     .   : milestone, 77,
    master - mean (73ms)  : 66, 81
     .   : milestone, 73,

    section CallTarget+Inlining+NGEN
    This PR (5730) - mean (1,008ms)  : 973, 1042
     .   : milestone, 1008,
    master - mean (987ms)  : 966, 1007
     .   : milestone, 987,

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

    section CallTarget+Inlining+NGEN
    This PR (5730) - mean (697ms)  : 669, 725
     .   : milestone, 697,
    master - mean (697ms)  : 677, 718
     .   : milestone, 697,

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

    section CallTarget+Inlining+NGEN
    This PR (5730) - mean (659ms)  : 637, 681
     .   : milestone, 659,
    master - mean (652ms)  : 630, 675
     .   : milestone, 652,

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

    section CallTarget+Inlining+NGEN
    This PR (5730) - mean (1,086ms)  : 1057, 1114
     .   : milestone, 1086,
    master - mean (1,080ms)  : 1055, 1104
     .   : milestone, 1080,

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

    section CallTarget+Inlining+NGEN
    This PR (5730) - mean (871ms)  : 846, 896
     .   : milestone, 871,
    master - mean (869ms)  : 846, 892
     .   : milestone, 869,

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

    section CallTarget+Inlining+NGEN
    This PR (5730) - mean (856ms)  : 834, 877
     .   : milestone, 856,
    master - mean (851ms)  : 826, 875
     .   : milestone, 851,

@andrewlock
Copy link
Member Author

Benchmarks Report for tracer 🐌

Benchmarks for #5730 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.143
  • 2 benchmarks are slower, with geometric mean 1.176
  • 1 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 ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.6μs 42.4ns 278ns 0.0117 0.00389 0 5.43 KB
master StartStopWithChild netcoreapp3.1 9.68μs 52.6ns 297ns 0.0142 0.00949 0 5.62 KB
master StartStopWithChild net472 16.1μs 53.8ns 208ns 1.03 0.322 0.0967 6.06 KB
#5730 StartStopWithChild net6.0 7.64μs 40.2ns 197ns 0.0155 0.00773 0 5.43 KB
#5730 StartStopWithChild netcoreapp3.1 9.75μs 47.4ns 260ns 0.0193 0.00483 0 5.62 KB
#5730 StartStopWithChild net472 16.2μs 46.9ns 181ns 1 0.282 0.0806 6.08 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 493μs 200ns 750ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 627μs 366ns 1.42μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 797μs 326ns 1.26μs 0.396 0 0 3.3 KB
#5730 WriteAndFlushEnrichedTraces net6.0 470μs 302ns 1.09μs 0 0 0 2.7 KB
#5730 WriteAndFlushEnrichedTraces netcoreapp3.1 631μs 180ns 674ns 0 0 0 2.7 KB
#5730 WriteAndFlushEnrichedTraces net472 822μs 143ns 515ns 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 171μs 229ns 888ns 0.171 0 0 18.44 KB
master SendRequest netcoreapp3.1 192μs 244ns 947ns 0.192 0 0 20.6 KB
master SendRequest net472 0.000103ns 8.37E‑05ns 0.000324ns 0 0 0 0 b
#5730 SendRequest net6.0 169μs 178ns 689ns 0.168 0 0 18.44 KB
#5730 SendRequest netcoreapp3.1 195μs 430ns 1.67μs 0.196 0 0 20.61 KB
#5730 SendRequest net472 0.000448ns 0.000256ns 0.000957ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #5730

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.85 KB 41.43 KB -415 B -0.99%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 572μs 120ns 431ns 0.548 0 0 41.85 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 661μs 1.52μs 5.88μs 0.326 0 0 41.7 KB
master WriteAndFlushEnrichedTraces net472 855μs 4.11μs 15.9μs 8.19 2.59 0.431 53.25 KB
#5730 WriteAndFlushEnrichedTraces net6.0 561μs 536ns 2.01μs 0.558 0 0 41.43 KB
#5730 WriteAndFlushEnrichedTraces netcoreapp3.1 657μs 1.04μs 4.01μs 0.334 0 0 41.8 KB
#5730 WriteAndFlushEnrichedTraces net472 885μs 3.49μs 13.5μs 8.19 2.59 0.431 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.13μs 0.431ns 1.67ns 0.0113 0 0 808 B
master ExecuteNonQuery netcoreapp3.1 1.47μs 1.04ns 4.04ns 0.0104 0 0 808 B
master ExecuteNonQuery net472 1.78μs 2.36ns 8.84ns 0.122 0 0 770 B
#5730 ExecuteNonQuery net6.0 1.11μs 0.545ns 2.04ns 0.0111 0 0 808 B
#5730 ExecuteNonQuery netcoreapp3.1 1.5μs 0.978ns 3.79ns 0.0105 0 0 808 B
#5730 ExecuteNonQuery net472 1.75μs 0.478ns 1.85ns 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 1.01ns 3.89ns 0.0139 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.56μs 0.666ns 2.4ns 0.0133 0 0 976 B
master CallElasticsearch net472 2.45μs 1.62ns 5.83ns 0.157 0.00122 0 995 B
master CallElasticsearchAsync net6.0 1.26μs 0.487ns 1.82ns 0.0133 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.55μs 0.907ns 3.27ns 0.0139 0 0 1.02 KB
master CallElasticsearchAsync net472 2.68μs 2.2ns 8.54ns 0.166 0.00133 0 1.05 KB
#5730 CallElasticsearch net6.0 1.19μs 0.434ns 1.62ns 0.0137 0 0 976 B
#5730 CallElasticsearch netcoreapp3.1 1.58μs 1.36ns 5.1ns 0.0127 0 0 976 B
#5730 CallElasticsearch net472 2.66μs 2.34ns 9.08ns 0.158 0.00132 0 995 B
#5730 CallElasticsearchAsync net6.0 1.25μs 0.628ns 2.27ns 0.0129 0 0 952 B
#5730 CallElasticsearchAsync netcoreapp3.1 1.61μs 0.624ns 2.34ns 0.0138 0 0 1.02 KB
#5730 CallElasticsearchAsync net472 2.74μs 1.96ns 7.6ns 0.167 0.00137 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.514ns 1.99ns 0.0134 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.62μs 0.419ns 1.57ns 0.013 0 0 952 B
master ExecuteAsync net472 1.79μs 3.87ns 14.5ns 0.145 0 0 915 B
#5730 ExecuteAsync net6.0 1.28μs 0.358ns 1.39ns 0.0135 0 0 952 B
#5730 ExecuteAsync netcoreapp3.1 1.71μs 0.953ns 3.44ns 0.0129 0 0 952 B
#5730 ExecuteAsync net472 1.88μs 1.04ns 3.9ns 0.145 0.000939 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.27μs 1.71ns 6.63ns 0.0298 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.26μs 2.03ns 7.03ns 0.0362 0 0 2.76 KB
master SendAsync net472 7.65μs 2.61ns 10.1ns 0.498 0 0 3.15 KB
#5730 SendAsync net6.0 4.16μs 1.76ns 6.58ns 0.0313 0 0 2.22 KB
#5730 SendAsync netcoreapp3.1 5.1μs 2.04ns 7.64ns 0.0382 0 0 2.76 KB
#5730 SendAsync net472 7.8μs 1.76ns 6.82ns 0.499 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.55μs 0.75ns 2.81ns 0.0229 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.17μs 1.49ns 5.78ns 0.0228 0 0 1.64 KB
master EnrichedLog net472 2.46μs 1.3ns 4.85ns 0.25 0 0 1.57 KB
#5730 EnrichedLog net6.0 1.52μs 0.841ns 3.14ns 0.0227 0 0 1.64 KB
#5730 EnrichedLog netcoreapp3.1 2.05μs 0.868ns 3.25ns 0.0214 0 0 1.64 KB
#5730 EnrichedLog net472 2.53μs 1.56ns 6.02ns 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 114μs 64.6ns 233ns 0.0568 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 120μs 169ns 653ns 0 0 0 4.28 KB
master EnrichedLog net472 147μs 74.8ns 290ns 0.66 0.22 0 4.46 KB
#5730 EnrichedLog net6.0 113μs 230ns 890ns 0.056 0 0 4.28 KB
#5730 EnrichedLog netcoreapp3.1 119μs 154ns 598ns 0 0 0 4.28 KB
#5730 EnrichedLog net472 146μs 55.8ns 209ns 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 3.09μs 1.12ns 4.35ns 0.0308 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 3.98μs 1.31ns 5.08ns 0.0298 0 0 2.2 KB
master EnrichedLog net472 4.81μs 1.68ns 6.51ns 0.32 0 0 2.02 KB
#5730 EnrichedLog net6.0 3.13μs 1.43ns 5.55ns 0.0299 0 0 2.2 KB
#5730 EnrichedLog netcoreapp3.1 4.25μs 1.15ns 4.44ns 0.0298 0 0 2.2 KB
#5730 EnrichedLog net472 5μs 1.24ns 4.82ns 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.47μs 0.908ns 3.52ns 0.0162 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.79μs 0.961ns 3.72ns 0.0152 0 0 1.14 KB
master SendReceive net472 2.08μs 3.23ns 12.5ns 0.183 0 0 1.16 KB
#5730 SendReceive net6.0 1.39μs 0.75ns 2.9ns 0.016 0 0 1.14 KB
#5730 SendReceive netcoreapp3.1 1.77μs 0.601ns 2.08ns 0.0152 0 0 1.14 KB
#5730 SendReceive net472 2.02μs 0.94ns 3.39ns 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.65μs 1.08ns 4.19ns 0.0226 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.91μs 2.5ns 9.69ns 0.0217 0 0 1.65 KB
master EnrichedLog net472 4.37μs 2.78ns 10.8ns 0.322 0 0 2.04 KB
#5730 EnrichedLog net6.0 2.82μs 1.11ns 4.32ns 0.021 0 0 1.6 KB
#5730 EnrichedLog netcoreapp3.1 4μs 1.74ns 6.75ns 0.0218 0 0 1.65 KB
#5730 EnrichedLog net472 4.57μs 3.01ns 11.2ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5730

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.182 392.38 463.76
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.171 480.15 562.08

Faster 🎉 in #5730

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 1.143 762.91 667.40

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 392ns 0.241ns 0.934ns 0.00802 0 0 576 B
master StartFinishSpan netcoreapp3.1 554ns 0.175ns 0.656ns 0.00775 0 0 576 B
master StartFinishSpan net472 600ns 0.604ns 2.34ns 0.0918 0 0 578 B
master StartFinishScope net6.0 480ns 0.206ns 0.77ns 0.00986 0 0 696 B
master StartFinishScope netcoreapp3.1 762ns 0.835ns 3.23ns 0.00924 0 0 696 B
master StartFinishScope net472 822ns 0.88ns 3.41ns 0.104 0 0 658 B
#5730 StartFinishSpan net6.0 464ns 0.223ns 0.866ns 0.00813 0 0 576 B
#5730 StartFinishSpan netcoreapp3.1 573ns 0.29ns 1.08ns 0.00776 0 0 576 B
#5730 StartFinishSpan net472 585ns 0.398ns 1.54ns 0.0918 0 0 578 B
#5730 StartFinishScope net6.0 562ns 0.228ns 0.884ns 0.00976 0 0 696 B
#5730 StartFinishScope netcoreapp3.1 668ns 0.262ns 0.98ns 0.00925 0 0 696 B
#5730 StartFinishScope net472 804ns 0.72ns 2.79ns 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 675ns 0.244ns 0.947ns 0.00975 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1μs 0.32ns 1.2ns 0.00955 0 0 696 B
master RunOnMethodBegin net472 1.1μs 0.591ns 2.29ns 0.104 0 0 658 B
#5730 RunOnMethodBegin net6.0 661ns 0.646ns 2.33ns 0.00997 0 0 696 B
#5730 RunOnMethodBegin netcoreapp3.1 917ns 2.64ns 10.2ns 0.00945 0 0 696 B
#5730 RunOnMethodBegin net472 1.04μs 0.522ns 2.02ns 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.

2 participants