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

Add ability to disable additional ADO.NET Command Types #6042

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bouwkast
Copy link
Contributor

@bouwkast bouwkast commented Sep 17, 2024

Summary of changes

Allows users to configure additionally ADO.NET DbCommands to be disabled so they won't have a Span created from them.

Reason for change

Since we instrument basically any DbCommand in ADO.NET this can lead to unwanted/duplicate Spans that customers have little control over. This allows for a comma-separated list of command type names that the .NET Tracer will not create a Span for if they encounter it.

Implementation details

Adds new Environment Variable DD_TRACE_DISABLED_ADONET_COMMAND_TYPES that accepts a comma-separated string of ADO.NET Command Type names that the Tracer will not create a Span for.

For example (some pseudo-code here):

Assuming we have a custom DbCommand FooDbCommand that we don't want Spans for ->

public class FooDbCommand : DbCommand
{
    ... class contents here
}

We'd need to set DD_TRACE_DISABLED_ADONET_COMMAND_TYPES to ->

DD_TRACE_DISABLED_ADONET_COMMAND_TYPES="FooDbCommand"

Test coverage

  • Extended current DbScopeFactoryTests to add new value.
  • Extended FakeCommandTests to include disabling of FakeCommand
  • Snapshotted those tests as well.

Other details

Merge the dd-go PR when this PR is merged: https://github.com/DataDog/dd-go/pull/150493

Backported to 2.x in #6054

@bouwkast bouwkast requested review from a team as code owners September 17, 2024 13:29
/// <para>"InterceptableDbCommand" and "ProfiledDbCommand" are always disabled by default.</para>
/// </summary>
/// <seealso cref="TracerSettings.DisabledAdoNetCommandTypes"/>
public const string DisabledAdoNetCommandTypes = "DD_TRACE_DISABLED_ADONET_COMMAND_TYPES";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Must add this to the config remapper

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to add it manually here in the repo and make a PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated the file manually with: "DD_TRACE_DISABLED_ADONET_COMMAND_TYPES": "trace_disabled_adonet_command_types",

/// <para>"InterceptableDbCommand" and "ProfiledDbCommand" are always disabled by default.</para>
/// </summary>
/// <seealso cref="TracerSettings.DisabledAdoNetCommandTypes"/>
public const string DisabledAdoNetCommandTypes = "DD_TRACE_DISABLED_ADONET_COMMAND_TYPES";
Copy link
Member

Choose a reason for hiding this comment

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

Level of care low, but what do you think of using IGNORED instead of DISABLED? As in DD_TRACE_IGNORED_ADONET_COMMAND_TYPES. Just throwing it out there, feel free to ignore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I was between IGNORED or DISABLED and opted for DISABLED actually because the Activity stuff (totally irrelevant here though).

As I also have this PR: #5795 which adds DD_TRACE_DISABLED_ACTIVITY_SOURCES and for Activity we already have a concept of Ignored with the IgnoreActivityHandler:

internal class IgnoreActivityHandler : IActivityHandler

Maybe I'm overthinking it?

Copy link
Member

Choose a reason for hiding this comment

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

Oh yeah, it's nice to be consistent then with DISABLED in both. Thanks!

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Sep 17, 2024

Datadog Report

Branch report: steven/29781
Commit report: 846624f
Test service: dd-trace-dotnet

✅ 0 Failed, 363464 Passed, 2069 Skipped, 15h 12m 20.21s Total Time

@andrewlock
Copy link
Member

andrewlock commented Sep 17, 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 (6042) - mean (69ms)  : 66, 72
     .   : milestone, 69,
    master - mean (70ms)  : 67, 73
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (6042) - mean (1,105ms)  : 1081, 1129
     .   : milestone, 1105,
    master - mean (1,106ms)  : 1075, 1137
     .   : milestone, 1106,

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

    section CallTarget+Inlining+NGEN
    This PR (6042) - mean (802ms)  : 778, 826
     .   : milestone, 802,
    master - mean (801ms)  : 783, 820
     .   : milestone, 801,

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

    section CallTarget+Inlining+NGEN
    This PR (6042) - mean (750ms)  : 724, 776
     .   : milestone, 750,
    master - mean (746ms)  : 724, 768
     .   : milestone, 746,

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

    section CallTarget+Inlining+NGEN
    This PR (6042) - mean (1,194ms)  : 1167, 1221
     .   : milestone, 1194,
    master - mean (1,192ms)  : 1167, 1217
     .   : milestone, 1192,

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

    section CallTarget+Inlining+NGEN
    This PR (6042) - mean (962ms)  : 939, 986
     .   : milestone, 962,
    master - mean (963ms)  : 942, 984
     .   : milestone, 963,

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

    section CallTarget+Inlining+NGEN
    This PR (6042) - mean (942ms)  : 917, 967
     .   : milestone, 942,
    master - mean (944ms)  : 916, 972
     .   : milestone, 944,

Loading

@@ -198,6 +198,31 @@ _ when commandTypeName.EndsWith(commandSuffix) =>
}
}

internal static bool IsDisabledCommandType(string commandTypeName)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we instead pass the Tracer object through the method parameters so this method doesn't rely on the static Tracer.Instance? WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good to me!
Needed to propagate the parameter up a bit as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has proven to be a bit of a headache as I have ultimately needed to pass Tracer.Instance to the static Cache class

Without doing more refactoring I may just revert this and depend on the static Tracer.Instance for now and come back later to refactor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah @zacharycmontoya I've reverted this, I'll look at it later (follow up PR) if that sounds okay?

Copy link
Collaborator

@zacharycmontoya zacharycmontoya left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@andrewlock
Copy link
Member

andrewlock commented Sep 17, 2024

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 (6042) (11.157M)   : 0, 11156820
    master (11.241M)   : 0, 11241347
    benchmarks/2.9.0 (11.081M)   : 0, 11080577

    section Automatic
    This PR (6042) (7.472M)   : 0, 7471799
    master (7.436M)   : 0, 7436259
    benchmarks/2.9.0 (7.732M)   : 0, 7732233

    section Trace stats
    master (7.624M)   : 0, 7623650

    section Manual
    master (11.144M)   : 0, 11143937

    section Manual + Automatic
    This PR (6042) (7.039M)   : 0, 7039138
    master (6.769M)   : 0, 6769336

    section DD_TRACE_ENABLED=0
    master (10.231M)   : 0, 10230944

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6042) (9.508M)   : 0, 9508377
    master (9.526M)   : 0, 9525943
    benchmarks/2.9.0 (9.798M)   : 0, 9798067

    section Automatic
    This PR (6042) (6.555M)   : 0, 6554686
    master (6.610M)   : 0, 6610089

    section Trace stats
    master (6.947M)   : 0, 6947051

    section Manual
    master (9.627M)   : 0, 9627325

    section Manual + Automatic
    This PR (6042) (6.191M)   : 0, 6191451
    master (6.082M)   : 0, 6081694

    section DD_TRACE_ENABLED=0
    master (8.789M)   : 0, 8789404

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6042) (10.028M)   : 0, 10028357
    master (10.078M)   : 0, 10077851
    benchmarks/2.9.0 (10.067M)   : 0, 10067315

    section Automatic
    This PR (6042) (6.556M)   : 0, 6556498
    master (6.777M)   : 0, 6777224
    benchmarks/2.9.0 (7.552M)   : 0, 7552193

    section Trace stats
    master (7.294M)   : 0, 7293536

    section Manual
    master (9.738M)   : 0, 9737534

    section Manual + Automatic
    This PR (6042) (6.070M)   : 0, 6069654
    master (6.208M)   : 0, 6208249

    section DD_TRACE_ENABLED=0
    master (9.212M)   : 0, 9211944

Loading

@andrewlock
Copy link
Member

andrewlock commented Sep 17, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #6042 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.184
  • 1 benchmarks are slower, with geometric mean 1.133
  • 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 43.5ns 292ns 0.0117 0.00389 0 5.43 KB
master StartStopWithChild netcoreapp3.1 10.1μs 56.5ns 357ns 0.0215 0.00539 0 5.61 KB
master StartStopWithChild net472 16.4μs 39.7ns 154ns 1.01 0.299 0.0889 6.05 KB
#6042 StartStopWithChild net6.0 7.65μs 39.8ns 232ns 0.0117 0.00389 0 5.43 KB
#6042 StartStopWithChild netcoreapp3.1 10.3μs 58.2ns 411ns 0.015 0.00999 0 5.62 KB
#6042 StartStopWithChild net472 16μs 35.6ns 138ns 1.02 0.297 0.0963 6.07 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 474μs 188ns 704ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 644μs 305ns 1.14μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 837μs 520ns 2.01μs 0.417 0 0 3.3 KB
#6042 WriteAndFlushEnrichedTraces net6.0 459μs 381ns 1.43μs 0 0 0 2.7 KB
#6042 WriteAndFlushEnrichedTraces netcoreapp3.1 637μs 282ns 1.05μs 0 0 0 2.7 KB
#6042 WriteAndFlushEnrichedTraces net472 848μs 613ns 2.38μs 0.422 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 196μs 1.1μs 8.57μs 0.187 0 0 18.45 KB
master SendRequest netcoreapp3.1 221μs 1.27μs 10.1μs 0.216 0 0 20.61 KB
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#6042 SendRequest net6.0 196μs 1.08μs 6.32μs 0.193 0 0 18.45 KB
#6042 SendRequest netcoreapp3.1 217μs 1.23μs 8.32μs 0.22 0 0 20.61 KB
#6042 SendRequest net472 0.00266ns 0.000895ns 0.00346ns 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 567μs 2.98μs 14.3μs 0.553 0 0 41.82 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 666μs 2.5μs 9.34μs 0.334 0 0 41.73 KB
master WriteAndFlushEnrichedTraces net472 877μs 3.33μs 12.5μs 8.19 2.59 0.431 53.31 KB
#6042 WriteAndFlushEnrichedTraces net6.0 554μs 2.58μs 9.64μs 0.546 0 0 41.66 KB
#6042 WriteAndFlushEnrichedTraces netcoreapp3.1 678μs 3.29μs 14.3μs 0.334 0 0 41.86 KB
#6042 WriteAndFlushEnrichedTraces net472 866μs 2.85μs 11.1μs 8.45 2.53 0.422 53.31 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.31μs 1.3ns 5.05ns 0.0145 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.77μs 2.3ns 8.92ns 0.0133 0 0 1.02 KB
master ExecuteNonQuery net472 2.15μs 2.63ns 10.2ns 0.156 0 0 987 B
#6042 ExecuteNonQuery net6.0 1.26μs 0.639ns 2.39ns 0.0141 0 0 1.02 KB
#6042 ExecuteNonQuery netcoreapp3.1 1.81μs 2.71ns 10.5ns 0.0136 0 0 1.02 KB
#6042 ExecuteNonQuery net472 2.06μs 2.49ns 9.32ns 0.157 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.21μs 1.1ns 4.25ns 0.0133 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.48μs 0.908ns 3.52ns 0.0133 0 0 976 B
master CallElasticsearch net472 2.66μs 7.72ns 29.9ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.33μs 1.37ns 4.92ns 0.0133 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.6μs 1.56ns 5.85ns 0.0136 0 0 1.02 KB
master CallElasticsearchAsync net472 2.7μs 7.04ns 27.3ns 0.167 0 0 1.05 KB
#6042 CallElasticsearch net6.0 1.25μs 0.367ns 1.42ns 0.0137 0 0 976 B
#6042 CallElasticsearch netcoreapp3.1 1.5μs 0.72ns 2.79ns 0.0127 0 0 976 B
#6042 CallElasticsearch net472 2.53μs 1.94ns 7.5ns 0.157 0 0 995 B
#6042 CallElasticsearchAsync net6.0 1.31μs 0.756ns 2.93ns 0.0131 0 0 952 B
#6042 CallElasticsearchAsync netcoreapp3.1 1.58μs 0.856ns 3.2ns 0.0132 0 0 1.02 KB
#6042 CallElasticsearchAsync net472 2.48μs 1.76ns 6.58ns 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.932ns 3.61ns 0.0135 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.53μs 0.602ns 2.25ns 0.0133 0 0 952 B
master ExecuteAsync net472 1.83μs 0.725ns 2.81ns 0.145 0 0 915 B
#6042 ExecuteAsync net6.0 1.21μs 1.06ns 3.97ns 0.0134 0 0 952 B
#6042 ExecuteAsync netcoreapp3.1 1.67μs 0.699ns 2.61ns 0.0125 0 0 952 B
#6042 ExecuteAsync net472 1.79μs 0.607ns 2.35ns 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.27μs 1.28ns 4.62ns 0.0298 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.07μs 2.45ns 9.5ns 0.0355 0 0 2.76 KB
master SendAsync net472 7.67μs 1.8ns 6.97ns 0.5 0 0 3.15 KB
#6042 SendAsync net6.0 4.02μs 1.51ns 5.46ns 0.0302 0 0 2.22 KB
#6042 SendAsync netcoreapp3.1 5.07μs 1.88ns 6.52ns 0.0354 0 0 2.76 KB
#6042 SendAsync net472 7.91μs 2.36ns 9.13ns 0.497 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.5μs 1.86ns 6.97ns 0.0232 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.18μs 0.845ns 3.16ns 0.0218 0 0 1.64 KB
master EnrichedLog net472 2.59μs 1.85ns 7.18ns 0.25 0 0 1.57 KB
#6042 EnrichedLog net6.0 1.47μs 1.38ns 5.35ns 0.0228 0 0 1.64 KB
#6042 EnrichedLog netcoreapp3.1 2.07μs 1.83ns 7.07ns 0.0215 0 0 1.64 KB
#6042 EnrichedLog net472 2.68μs 1.34ns 5.21ns 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 108ns 403ns 0.0566 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 119μs 232ns 897ns 0 0 0 4.28 KB
master EnrichedLog net472 146μs 103ns 398ns 0.659 0.22 0 4.46 KB
#6042 EnrichedLog net6.0 115μs 234ns 877ns 0.0577 0 0 4.28 KB
#6042 EnrichedLog netcoreapp3.1 118μs 288ns 1.12μs 0 0 0 4.28 KB
#6042 EnrichedLog net472 145μs 37.8ns 136ns 0.651 0.217 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.91μs 1.01ns 3.77ns 0.0306 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.33μs 1.1ns 4.11ns 0.0282 0 0 2.2 KB
master EnrichedLog net472 5.14μs 2.54ns 9.82ns 0.319 0 0 2.02 KB
#6042 EnrichedLog net6.0 2.98μs 1.42ns 5.52ns 0.0304 0 0 2.2 KB
#6042 EnrichedLog netcoreapp3.1 4.16μs 1.67ns 6.48ns 0.0286 0 0 2.2 KB
#6042 EnrichedLog net472 4.88μs 1.4ns 5.25ns 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.38μs 0.585ns 2.26ns 0.0159 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.73μs 1.97ns 7.62ns 0.0156 0 0 1.14 KB
master SendReceive net472 1.96μs 0.852ns 3.3ns 0.183 0.000981 0 1.16 KB
#6042 SendReceive net6.0 1.27μs 0.773ns 2.89ns 0.016 0 0 1.14 KB
#6042 SendReceive netcoreapp3.1 1.74μs 1.43ns 5.34ns 0.0157 0 0 1.14 KB
#6042 SendReceive net472 2.04μs 1.82ns 7.05ns 0.183 0.00103 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.78μs 0.945ns 3.54ns 0.0223 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.84μs 1.81ns 6.77ns 0.0229 0 0 1.65 KB
master EnrichedLog net472 4.37μs 1.79ns 6.92ns 0.323 0 0 2.04 KB
#6042 EnrichedLog net6.0 2.7μs 0.815ns 3.16ns 0.0216 0 0 1.6 KB
#6042 EnrichedLog netcoreapp3.1 3.92μs 1.15ns 4.16ns 0.0216 0 0 1.65 KB
#6042 EnrichedLog net472 4.36μs 2.24ns 8.37ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6042

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.133 482.01 546.17

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 399ns 0.129ns 0.499ns 0.00816 0 0 576 B
master StartFinishSpan netcoreapp3.1 568ns 3.15ns 20.2ns 0.0078 0 0 576 B
master StartFinishSpan net472 670ns 2.34ns 8.77ns 0.0915 0 0 578 B
master StartFinishScope net6.0 482ns 0.23ns 0.861ns 0.0097 0 0 696 B
master StartFinishScope netcoreapp3.1 722ns 0.692ns 2.68ns 0.00944 0 0 696 B
master StartFinishScope net472 845ns 0.592ns 2.29ns 0.105 0 0 658 B
#6042 StartFinishSpan net6.0 402ns 0.186ns 0.721ns 0.00807 0 0 576 B
#6042 StartFinishSpan netcoreapp3.1 615ns 3.3ns 16.8ns 0.00768 0 0 576 B
#6042 StartFinishSpan net472 666ns 0.264ns 1.02ns 0.0916 0 0 578 B
#6042 StartFinishScope net6.0 546ns 0.147ns 0.568ns 0.00985 0 0 696 B
#6042 StartFinishScope netcoreapp3.1 759ns 0.645ns 2.5ns 0.00952 0 0 696 B
#6042 StartFinishScope net472 891ns 2.1ns 8.15ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6042

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.184 681.97 575.89

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 682ns 0.353ns 1.37ns 0.00982 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 964ns 1.65ns 6.4ns 0.00957 0 0 696 B
master RunOnMethodBegin net472 1.14μs 4.41ns 17.1ns 0.104 0 0 658 B
#6042 RunOnMethodBegin net6.0 576ns 0.154ns 0.578ns 0.00984 0 0 696 B
#6042 RunOnMethodBegin netcoreapp3.1 897ns 0.4ns 1.5ns 0.00946 0 0 696 B
#6042 RunOnMethodBegin net472 1.19μs 0.661ns 2.56ns 0.104 0 0 658 B

@bouwkast
Copy link
Contributor Author

Adding do-not-merge as we are testing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:do-not-merge Work is done. Can review, but do not merge yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants