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

Enforce not referencing Datadog.Trace directly in sample projects #5683

Merged

Conversation

andrewlock
Copy link
Member

Summary of changes

  • Enforces not directly referencing Datadog.Trace in the sample projects
  • Removes a direct reference in Samples.CIVisibilityIpc
  • Fixes the build of CallTargetNativeTest on Windows

Reason for change

  • We have an informal "policy" that we shouldn't be directly referencing Datadog.Trace in the samples.
    • Originally this was because it interfered with code coverage concerns, but at this point it's mostly because we have abstractions in place to use instead, which allow us to switch things out.
  • It simplifies some things around the build we're hoping to do later
    • If we can treat the samples as "independent" of code changes in the tracer, then we can do things like build them in parallel, cache them aggressively.
    • We're not blocking referencing Datadog.Trace.Manual here, partly because we likely want to reference that to test it properly, but also because it's much more lightweight (therefore quick and easy to rebuild), and changes comparatively rarely
    • Note we also allow references to Datadog.Trace package references (e.g. for version conflict test scenarios)

Implementation details

  • Add a target to Directory.Build.props that checks for a project reference to Datadog.Trace.
  • Add override using AllowDatadogTraceReference in projects we expect to reference Datadog.Trace
  • Remove references where we shouldn't have them
  • Fix the build of CallTargetNativeTest on Windows (.NET FX requires System.Memory, and doesn't have the same implicit conversions between ReadOnlySpan<char> and string as .NET Core)

Test coverage

Should all be covered by existing tests

Other details

This is prerequisite work for some work to speed up/improve CI

@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Jun 12, 2024
@andrewlock andrewlock requested review from a team as code owners June 12, 2024 13:18
@andrewlock andrewlock changed the title Enforce not referencing Datadog.Trace directly Enforce not referencing Datadog.Trace directly in sample projects Jun 12, 2024
@github-actions github-actions bot added the area:tests unit tests, integration tests label Jun 12, 2024
Copy link
Contributor

@bouwkast bouwkast left a comment

Choose a reason for hiding this comment

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

Nice!

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jun 12, 2024

Datadog Report

Branch report: andrew/ci/enforce-not-referencing-datadog-trace-directly
Commit report: 967b274
Test service: dd-trace-dotnet

✅ 0 Failed, 348637 Passed, 2158 Skipped, 22h 28m 34.73s Total Time

@andrewlock
Copy link
Member Author

andrewlock commented Jun 12, 2024

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 (5683) - mean (75ms)  : 60, 91
     .   : milestone, 75,
    master - mean (73ms)  : 66, 80
     .   : milestone, 73,

    section CallTarget+Inlining+NGEN
    This PR (5683) - mean (1,006ms)  : 983, 1030
     .   : milestone, 1006,
    master - mean (1,010ms)  : 990, 1029
     .   : milestone, 1010,

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

    section CallTarget+Inlining+NGEN
    This PR (5683) - mean (718ms)  : 689, 747
     .   : milestone, 718,
    master - mean (712ms)  : 690, 735
     .   : milestone, 712,

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

    section CallTarget+Inlining+NGEN
    This PR (5683) - mean (665ms)  : 642, 688
     .   : milestone, 665,
    master - mean (669ms)  : 646, 691
     .   : milestone, 669,

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

    section CallTarget+Inlining+NGEN
    This PR (5683) - mean (1,098ms)  : 1069, 1127
     .   : milestone, 1098,
    master - mean (1,099ms)  : 1078, 1121
     .   : milestone, 1099,

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

    section CallTarget+Inlining+NGEN
    This PR (5683) - mean (896ms)  : 873, 919
     .   : milestone, 896,
    master - mean (899ms)  : 874, 925
     .   : milestone, 899,

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

    section CallTarget+Inlining+NGEN
    This PR (5683) - mean (879ms)  : 852, 906
     .   : milestone, 879,
    master - mean (878ms)  : 854, 903
     .   : milestone, 878,

Loading

@andrewlock
Copy link
Member Author

andrewlock commented Jun 12, 2024

Throughput/Crank Report:zap:

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 (5683) (11.392M)   : 0, 11392332
    master (11.559M)   : 0, 11559447
    benchmarks/2.9.0 (11.627M)   : 0, 11626549

    section Automatic
    This PR (5683) (7.689M)   : 0, 7688578
    master (7.850M)   : 0, 7849728
    benchmarks/2.9.0 (8.152M)   : 0, 8152375

    section Trace stats
    master (8.099M)   : 0, 8099150

    section Manual
    This PR (5683) (9.734M)   : 0, 9733548
    master (9.854M)   : 0, 9853955

    section Manual + Automatic
    This PR (5683) (7.221M)   : 0, 7220914
    master (7.295M)   : 0, 7295073

    section Version Conflict
    master (6.517M)   : 0, 6517481

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5683) (9.371M)   : 0, 9370522
    master (9.476M)   : 0, 9475757
    benchmarks/2.9.0 (9.556M)   : 0, 9555681

    section Automatic
    This PR (5683) (6.544M)   : 0, 6543963
    master (6.724M)   : 0, 6723830

    section Trace stats
    master (6.935M)   : 0, 6934501

    section Manual
    This PR (5683) (8.455M)   : 0, 8455106
    master (8.345M)   : 0, 8345357

    section Manual + Automatic
    This PR (5683) (6.193M)   : 0, 6192868
    master (6.290M)   : 0, 6289651

    section Version Conflict
    master (5.639M)   : 0, 5638885

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5683) (10.172M)   : 0, 10171613
    master (10.075M)   : 0, 10074879
    benchmarks/2.9.0 (10.130M)   : 0, 10129519

    section Automatic
    This PR (5683) (7.278M)   : 0, 7277689
    master (7.058M)   : 0, 7058398
    benchmarks/2.9.0 (7.456M)   : 0, 7456006

    section Trace stats
    master (7.435M)   : 0, 7435275

    section Manual
    This PR (5683) (9.091M)   : 0, 9090985
    master (8.837M)   : 0, 8837025

    section Manual + Automatic
    This PR (5683) (6.998M)   : 0, 6997917
    master (6.888M)   : 0, 6887732

    section Version Conflict
    master (6.128M)   : 0, 6127636

Loading

@andrewlock
Copy link
Member Author

andrewlock commented Jun 12, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #5683 compared to master:

  • 3 benchmarks are faster, with geometric mean 1.127
  • 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.47μs 42.3ns 305ns 0.0187 0.00749 0 5.43 KB
master StartStopWithChild netcoreapp3.1 9.74μs 45.2ns 169ns 0.0149 0.00497 0 5.61 KB
master StartStopWithChild net472 16.1μs 34.2ns 133ns 1.03 0.32 0.0936 6.06 KB
#5683 StartStopWithChild net6.0 7.76μs 44.3ns 352ns 0.0122 0.00407 0 5.42 KB
#5683 StartStopWithChild netcoreapp3.1 10.3μs 54.1ns 306ns 0.0202 0.0101 0 5.61 KB
#5683 StartStopWithChild net472 15.9μs 48.1ns 180ns 1.03 0.32 0.104 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 481μs 623ns 2.41μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 624μs 310ns 1.2μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 825μs 251ns 907ns 0.411 0 0 3.3 KB
#5683 WriteAndFlushEnrichedTraces net6.0 471μs 202ns 727ns 0 0 0 2.7 KB
#5683 WriteAndFlushEnrichedTraces netcoreapp3.1 626μs 248ns 960ns 0 0 0 2.7 KB
#5683 WriteAndFlushEnrichedTraces net472 821μs 198ns 742ns 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 173ns 671ns 0.252 0 0 18.44 KB
master SendRequest netcoreapp3.1 190μs 360ns 1.39μs 0.19 0 0 20.6 KB
master SendRequest net472 0.000851ns 0.00027ns 0.00101ns 0 0 0 0 b
#5683 SendRequest net6.0 172μs 353ns 1.37μs 0.255 0 0 18.44 KB
#5683 SendRequest netcoreapp3.1 192μs 406ns 1.57μs 0.192 0 0 20.6 KB
#5683 SendRequest net472 1.58E‑05ns 1.58E‑05ns 6.12E‑05ns 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 542μs 2.04μs 7.36μs 0.532 0 0 41.49 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 654μs 739ns 2.86μs 0.327 0 0 41.7 KB
master WriteAndFlushEnrichedTraces net472 858μs 3.53μs 13.7μs 8.19 2.59 0.431 53.24 KB
#5683 WriteAndFlushEnrichedTraces net6.0 554μs 895ns 3.47μs 0.548 0 0 41.69 KB
#5683 WriteAndFlushEnrichedTraces netcoreapp3.1 663μs 1.75μs 6.77μs 0.327 0 0 41.79 KB
#5683 WriteAndFlushEnrichedTraces net472 852μs 4.34μs 18.9μs 8.08 2.55 0.425 53.22 KB
Benchmarks.Trace.DbCommandBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5683

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net6.0 1.126 1,237.52 1,099.50

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.24μs 1.11ns 4.3ns 0.0113 0 0 808 B
master ExecuteNonQuery netcoreapp3.1 1.46μs 0.676ns 2.62ns 0.0109 0 0 808 B
master ExecuteNonQuery net472 1.68μs 0.481ns 1.86ns 0.122 0 0 770 B
#5683 ExecuteNonQuery net6.0 1.1μs 0.31ns 1.16ns 0.011 0 0 808 B
#5683 ExecuteNonQuery netcoreapp3.1 1.49μs 2.69ns 10.4ns 0.0108 0 0 808 B
#5683 ExecuteNonQuery net472 1.76μs 1.45ns 5.62ns 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.25μs 0.29ns 1.08ns 0.0138 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.47μs 0.748ns 2.8ns 0.0132 0 0 976 B
master CallElasticsearch net472 2.56μs 1.66ns 6.44ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.2μs 0.43ns 1.61ns 0.0132 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.63μs 0.874ns 3.15ns 0.0137 0 0 1.02 KB
master CallElasticsearchAsync net472 2.51μs 1.7ns 6.6ns 0.167 0.00125 0 1.05 KB
#5683 CallElasticsearch net6.0 1.16μs 0.827ns 3.2ns 0.0134 0 0 976 B
#5683 CallElasticsearch netcoreapp3.1 1.6μs 3.79ns 14.7ns 0.0129 0 0 976 B
#5683 CallElasticsearch net472 2.44μs 1.32ns 4.95ns 0.157 0.00124 0 995 B
#5683 CallElasticsearchAsync net6.0 1.23μs 1.27ns 4.91ns 0.0129 0 0 952 B
#5683 CallElasticsearchAsync netcoreapp3.1 1.62μs 0.79ns 3.06ns 0.0139 0 0 1.02 KB
#5683 CallElasticsearchAsync net472 2.58μs 1.09ns 4.23ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5683

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 1.142 1,430.18 1,252.43

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.43μs 0.498ns 1.93ns 0.0129 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.58μs 1.13ns 4.39ns 0.0127 0 0 952 B
master ExecuteAsync net472 1.74μs 0.698ns 2.61ns 0.145 0 0 915 B
#5683 ExecuteAsync net6.0 1.25μs 0.34ns 1.27ns 0.0132 0 0 952 B
#5683 ExecuteAsync netcoreapp3.1 1.68μs 0.512ns 1.91ns 0.0126 0 0 952 B
#5683 ExecuteAsync net472 1.76μs 0.957ns 3.71ns 0.145 0.000872 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.04μs 1.26ns 4.72ns 0.0304 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.11μs 2.29ns 8.57ns 0.0359 0 0 2.76 KB
master SendAsync net472 7.67μs 2.89ns 11.2ns 0.499 0 0 3.15 KB
#5683 SendAsync net6.0 4.2μs 1.82ns 6.79ns 0.0294 0 0 2.22 KB
#5683 SendAsync netcoreapp3.1 5.14μs 4.21ns 16.3ns 0.036 0 0 2.76 KB
#5683 SendAsync net472 7.64μs 2.17ns 8.12ns 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.52μs 0.864ns 3.23ns 0.0228 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.31μs 1.66ns 5.98ns 0.0225 0 0 1.64 KB
master EnrichedLog net472 2.53μs 1.1ns 4.11ns 0.25 0 0 1.57 KB
#5683 EnrichedLog net6.0 1.56μs 0.576ns 2.16ns 0.0226 0 0 1.64 KB
#5683 EnrichedLog netcoreapp3.1 2.15μs 0.893ns 3.34ns 0.0215 0 0 1.64 KB
#5683 EnrichedLog net472 2.53μs 1.06ns 4.1ns 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 113μs 93.6ns 362ns 0.0564 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 118μs 177ns 685ns 0 0 0 4.28 KB
master EnrichedLog net472 146μs 173ns 670ns 0.656 0.219 0 4.46 KB
#5683 EnrichedLog net6.0 113μs 97.6ns 365ns 0.0564 0 0 4.28 KB
#5683 EnrichedLog netcoreapp3.1 118μs 186ns 719ns 0.0588 0 0 4.28 KB
#5683 EnrichedLog net472 146μs 54.1ns 210ns 0.654 0.218 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.98μs 1.71ns 6.38ns 0.0312 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.29μs 3.18ns 12.3ns 0.03 0 0 2.2 KB
master EnrichedLog net472 4.9μs 1.62ns 6.06ns 0.318 0 0 2.02 KB
#5683 EnrichedLog net6.0 3.1μs 1.91ns 7.16ns 0.0302 0 0 2.2 KB
#5683 EnrichedLog netcoreapp3.1 4.26μs 1.8ns 6.73ns 0.0276 0 0 2.2 KB
#5683 EnrichedLog net472 4.89μs 1.83ns 7.07ns 0.319 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.29μs 0.454ns 1.7ns 0.0161 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.71μs 0.969ns 3.63ns 0.0153 0 0 1.14 KB
master SendReceive net472 2.11μs 1.13ns 4.37ns 0.183 0.00105 0 1.16 KB
#5683 SendReceive net6.0 1.35μs 2.7ns 10.5ns 0.0163 0 0 1.14 KB
#5683 SendReceive netcoreapp3.1 1.75μs 1.29ns 4.99ns 0.0151 0 0 1.14 KB
#5683 SendReceive net472 2.07μs 1.17ns 4.53ns 0.183 0.001 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.84μs 2.86ns 11.1ns 0.0213 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.93μs 1.37ns 4.93ns 0.0218 0 0 1.65 KB
master EnrichedLog net472 4.34μs 1.94ns 7.27ns 0.324 0 0 2.04 KB
#5683 EnrichedLog net6.0 2.71μs 1ns 3.76ns 0.0231 0 0 1.6 KB
#5683 EnrichedLog netcoreapp3.1 3.81μs 1.45ns 5.62ns 0.0209 0 0 1.65 KB
#5683 EnrichedLog net472 4.49μs 3.3ns 12.4ns 0.324 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 391ns 0.142ns 0.552ns 0.00808 0 0 576 B
master StartFinishSpan netcoreapp3.1 638ns 0.519ns 2.01ns 0.00777 0 0 576 B
master StartFinishSpan net472 689ns 0.369ns 1.33ns 0.0915 0 0 578 B
master StartFinishScope net6.0 475ns 0.182ns 0.682ns 0.00986 0 0 696 B
master StartFinishScope netcoreapp3.1 746ns 0.852ns 3.3ns 0.00948 0 0 696 B
master StartFinishScope net472 885ns 0.49ns 1.9ns 0.104 0 0 658 B
#5683 StartFinishSpan net6.0 397ns 0.144ns 0.558ns 0.00811 0 0 576 B
#5683 StartFinishSpan netcoreapp3.1 635ns 0.17ns 0.66ns 0.00766 0 0 576 B
#5683 StartFinishSpan net472 636ns 0.485ns 1.88ns 0.0916 0 0 578 B
#5683 StartFinishScope net6.0 478ns 0.129ns 0.498ns 0.00982 0 0 696 B
#5683 StartFinishScope netcoreapp3.1 803ns 0.219ns 0.819ns 0.00949 0 0 696 B
#5683 StartFinishScope net472 804ns 0.44ns 1.71ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5683

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net472 1.113 1,140.92 1,025.22

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 637ns 2.44ns 9.47ns 0.00969 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 887ns 1.85ns 7.18ns 0.00963 0 0 696 B
master RunOnMethodBegin net472 1.14μs 0.496ns 1.92ns 0.104 0 0 658 B
#5683 RunOnMethodBegin net6.0 638ns 0.296ns 1.15ns 0.00962 0 0 696 B
#5683 RunOnMethodBegin netcoreapp3.1 915ns 0.662ns 2.56ns 0.00907 0 0 696 B
#5683 RunOnMethodBegin net472 1.03μs 0.579ns 2.24ns 0.104 0 0 658 B

Copy link
Contributor

@daniel-romano-DD daniel-romano-DD left a comment

Choose a reason for hiding this comment

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

An elegant solution. 👌

@andrewlock andrewlock force-pushed the andrew/ci/enforce-not-referencing-datadog-trace-directly branch from a2fcfa9 to 9e2ea7a Compare June 17, 2024 16:38
@andrewlock andrewlock requested a review from a team as a code owner June 17, 2024 16:38
@andrewlock andrewlock force-pushed the andrew/ci/enforce-not-referencing-datadog-trace-directly branch from afa0273 to 967b274 Compare June 19, 2024 09:49
@andrewlock andrewlock merged commit 57ca38c into master Jun 24, 2024
61 of 62 checks passed
@andrewlock andrewlock deleted the andrew/ci/enforce-not-referencing-datadog-trace-directly branch June 24, 2024 08:45
@github-actions github-actions bot added this to the vNext-v2 milestone Jun 24, 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:tests unit tests, integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants