dd-trace-dotnet icon indicating copy to clipboard operation
dd-trace-dotnet copied to clipboard

Merge v3

Open andrewlock opened this issue 1 year ago • 7 comments

Summary of changes

Update to V3

Reason for change

This contains all the breaking changes for v3

Implementation details

Implemented in individual PRs

Test coverage

Should be the same! We should look through carefully to make sure there's nothing concerning.

Other details

Once we merge this, we'll cut the release/v2 branch.

We don't want to squash this one when we merge, instead we'll use a fast forward merge or an explicit merge commit.

andrewlock avatar Apr 05 '24 12:04 andrewlock

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer. The diff is simplistic, so please check some files anyway while we improve it.

2 occurrences of :

+        "language": "dotnet",

5947 occurrences of :

+      language: dotnet,

1 occurrences of :

-  {
-    TraceId: Id_1,
-    SpanId: Id_2,
-    Name: Manual-1.Initial,
-    Resource: Manual-1.Initial,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_1,
-    SpanId: Id_3,
-    Name: Manual-1.Initial.HttpClient,
-    Resource: Manual-1.Initial.HttpClient,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_2,
-    Tags: {
-      env: integration_tests,
-      language: dotnet
-    }
-  },
-  {
-    TraceId: Id_4,
-    SpanId: Id_5,
-    Name: Manual-1.Initial.HttpListener,
-    Resource: Manual-1.Initial.HttpListener,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      content: PONG,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_6,
-    SpanId: Id_7,
-    Name: Manual-2.Reconfigured,
-    Resource: Manual-2.Reconfigured,
-    Service: updated-name,
-    Tags: {
-      env: updated-env,
-      language: dotnet,
-      runtime-id: Guid_1,
-      Updated-key: Updated Value
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_6,
-    SpanId: Id_8,
-    Name: Manual-2.Reconfigured.HttpClient,
-    Resource: Manual-2.Reconfigured.HttpClient,
-    Service: updated-name,
-    ParentId: Id_7,
-    Tags: {
-      env: updated-env,
-      language: dotnet,
-      Updated-key: Updated Value
-    }
-  },
-  {
-    TraceId: Id_9,
-    SpanId: Id_10,
-    Name: Manual-2.Reconfigured.HttpListener,
-    Resource: Manual-2.Reconfigured.HttpListener,
-    Service: updated-name,
-    Tags: {
-      content: PONG,
-      env: updated-env,
-      language: dotnet,
-      runtime-id: Guid_1,
-      Updated-key: Updated Value
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_11,
-    SpanId: Id_12,
-    Name: Manual-3.HttpDisabled,
-    Resource: Manual-3.HttpDisabled,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_11,
-    SpanId: Id_13,
-    Name: Manual-3.HttpDisabled.HttpClient,
-    Resource: Manual-3.HttpDisabled.HttpClient,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_12,
-    Tags: {
-      env: integration_tests,
-      language: dotnet
-    }
-  },
-  {
-    TraceId: Id_14,
-    SpanId: Id_15,
-    Name: Manual-3.HttpDisabled.HttpListener,
-    Resource: Manual-3.HttpDisabled.HttpListener,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      content: PONG,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_16,
-    SpanId: Id_17,
-    Name: Manual-4.DefaultsReinstated,
-    Resource: Manual-4.DefaultsReinstated,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_16,
-    SpanId: Id_18,
-    Name: Manual-4.DefaultsReinstated.HttpClient,
-    Resource: Manual-4.DefaultsReinstated.HttpClient,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_17,
-    Tags: {
-      env: integration_tests,
-      language: dotnet
-    }
-  },
-  {
-    TraceId: Id_19,
-    SpanId: Id_20,
-    Name: Manual-4.DefaultsReinstated.HttpListener,
-    Resource: Manual-4.DefaultsReinstated.HttpListener,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      content: PONG,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_21,
-    SpanId: Id_22,
-    Name: Manual-5.Ext.HttpListener,
-    Resource: Manual-5.Ext.HttpListener,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      content: PONG,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_23,
-    SpanId: Id_24,
-    Name: Manual-5.Ext.Outer,
-    Resource: Manual-5.Ext.Outer,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1,
-      usr.email: [email protected],
-      usr.id: my-id,
-      usr.name: Bits,
-      usr.role: Mascot,
-      usr.scope: test-scope,
-      usr.session_id: abc123
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 2.0
-    }
-  },
-  {
-    TraceId: Id_23,
-    SpanId: Id_25,
-    Name: Manual-5.Ext.Inner,
-    Resource: Manual-5.Ext.Inner,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_24,
-    Error: 1,
-    Tags: {
-      Custom: Some-Value,
-      env: integration_tests,
-      error.msg: Exception of type 'CustomException' was thrown.,
-      error.stack:
[...]
-      error.type: CustomException,
-      language: dotnet
-    },
-    Metrics: {
-      Some-Number: 123.0
-    }
-  },
-  {
-    TraceId: Id_23,
-    SpanId: Id_26,
-    Name: Manual-5.Ext.HttpClient,
-    Resource: Manual-5.Ext.HttpClient,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_25,
-    Tags: {
-      env: integration_tests,
-      language: dotnet
-    }
-  },
-  {
-    TraceId: Id_27,
-    SpanId: Id_28,
-    Name: Manual-6.EventSdk.Custom.Outer,
-    Resource: Manual-6.EventSdk.Custom.Outer,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      appsec.events.custom-event-meta.key-1: val-1,
-      appsec.events.custom-event-meta.key-2: val-2,
-      appsec.events.custom-event-meta.track: true,
-      appsec.events.custom-event.track: true,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1,
-      _dd.appsec.events.custom-event-meta.sdk: true,
-      _dd.appsec.events.custom-event.sdk: true
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_27,
-    SpanId: Id_29,
-    Name: Manual-6.EventSdk.Custom.Inner,
-    Resource: Manual-6.EventSdk.Custom.Inner,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_28,
-    Tags: {
-      env: integration_tests,
-      language: dotnet
-    }
-  },
-  {
-    TraceId: Id_27,
-    SpanId: Id_30,
-    Name: Manual-6.Ext.HttpClient,
-    Resource: Manual-6.Ext.HttpClient,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_29,
-    Tags: {
-      env: integration_tests,
-      language: dotnet
-    }
-  },
-  {
-    TraceId: Id_31,
-    SpanId: Id_32,
-    Name: Manual-6.Ext.HttpListener,
-    Resource: Manual-6.Ext.HttpListener,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      content: PONG,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_33,
-    SpanId: Id_34,
-    Name: Manual-7.EventSdk.Success.Outer,
-    Resource: Manual-7.EventSdk.Success.Outer,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      appsec.events.users.login.success.key-1: val-1,
-      appsec.events.users.login.success.key-2: val-2,
-      appsec.events.users.login.success.track: true,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1,
-      usr.id: my-id,
-      _dd.appsec.events.users.login.success.sdk: true
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_33,
-    SpanId: Id_35,
-    Name: Manual-7.EventSdk.Success.Inner,
-    Resource: Manual-7.EventSdk.Success.Inner,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_34,
-    Tags: {
-      env: integration_tests,
-      language: dotnet
-    }
-  },
-  {
-    TraceId: Id_33,
-    SpanId: Id_36,
-    Name: Manual-7.Ext.HttpClient,
-    Resource: Manual-7.Ext.HttpClient,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_35,
-    Tags: {
-      env: integration_tests,
-      language: dotnet
-    }
-  },
-  {
-    TraceId: Id_37,
-    SpanId: Id_38,
-    Name: Manual-7.Ext.HttpListener,
-    Resource: Manual-7.Ext.HttpListener,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      content: PONG,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_39,
-    SpanId: Id_40,
-    Name: Manual-8.EventSdk.Failure.Outer,
-    Resource: Manual-8.EventSdk.Failure.Outer,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      appsec.events.users.login.failure.key-1: val-1,
-      appsec.events.users.login.failure.key-2: val-2,
-      appsec.events.users.login.failure.track: true,
-      appsec.events.users.login.failure.usr.exists: true,
-      appsec.events.users.login.failure.usr.id: my-id,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1,
-      _dd.appsec.events.users.login.failure.sdk: true
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_39,
-    SpanId: Id_41,
-    Name: Manual-8.EventSdk.Failure.Inner,
-    Resource: Manual-8.EventSdk.Failure.Inner,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_40,
-    Tags: {
-      env: integration_tests,
-      language: dotnet
-    }
-  },
-  {
-    TraceId: Id_39,
-    SpanId: Id_42,
-    Name: Manual-8.Ext.HttpClient,
-    Resource: Manual-8.Ext.HttpClient,
-    Service: Samples.ManualInstrumentation,
-    ParentId: Id_41,
-    Tags: {
-      env: integration_tests,
-      language: dotnet
-    }
-  },
-  {
-    TraceId: Id_43,
-    SpanId: Id_44,
-    Name: Manual-8.Ext.HttpListener,
-    Resource: Manual-8.Ext.HttpListener,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      content: PONG,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  },
-  {
-    TraceId: Id_45,
-    SpanId: Id_46,
-    Name: Manual-9.CustomContext.HttpListener,
-    Resource: Manual-9.CustomContext.HttpListener,
-    Service: Samples.ManualInstrumentation,
-    Tags: {
-      content: PONG,
-      env: integration_tests,
-      language: dotnet,
-      runtime-id: Guid_1
-    },
-    Metrics: {
-      process_id: 0,
-      _dd.top_level: 1.0,
-      _dd.tracer_kr: 1.0,
-      _sampling_priority_v1: 1.0
-    }
-  }

github-actions[bot] avatar Apr 05 '24 12:04 github-actions[bot]

Datadog Report

Branch report: v3-main Commit report: 3f5b5a3 Test service: dd-trace-dotnet

:white_check_mark: 0 Failed, 339401 Passed, 2308 Skipped, 48m 53.61s Wall Time

datadog-ddstaging[bot] avatar Apr 05 '24 13:04 datadog-ddstaging[bot]

Execution-Time Benchmarks Report :stopwatch:

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 (5408) - mean (73ms)  : 64, 82
     .   : milestone, 73,
    master - mean (71ms)  : 66, 77
     .   : milestone, 71,

    section CallTarget+Inlining+NGEN
    This PR (5408) - mean (1,061ms)  : 1035, 1086
     .   : milestone, 1061,
    master - mean (1,045ms)  : 1020, 1070
     .   : milestone, 1045,

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

    section CallTarget+Inlining+NGEN
    This PR (5408) - mean (753ms)  : 732, 774
     .   : milestone, 753,
    master - mean (745ms)  : 720, 770
     .   : milestone, 745,

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

    section CallTarget+Inlining+NGEN
    This PR (5408) - mean (699ms)  : 673, 724
     .   : milestone, 699,
    master - mean (688ms)  : 669, 708
     .   : milestone, 688,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5408) - mean (192ms)  : 188, 196
     .   : milestone, 192,
    master - mean (193ms)  : 189, 198
     .   : milestone, 193,

    section CallTarget+Inlining+NGEN
    This PR (5408) - mean (1,154ms)  : 1131, 1177
     .   : milestone, 1154,
    master - mean (1,135ms)  : 1113, 1158
     .   : milestone, 1135,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5408) - mean (277ms)  : 272, 282
     .   : milestone, 277,
    master - mean (278ms)  : 273, 283
     .   : milestone, 278,

    section CallTarget+Inlining+NGEN
    This PR (5408) - mean (915ms)  : 891, 939
     .   : milestone, 915,
    master - mean (904ms)  : 886, 923
     .   : milestone, 904,

gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5408) - mean (267ms)  : 260, 273
     .   : milestone, 267,
    master - mean (267ms)  : 262, 272
     .   : milestone, 267,

    section CallTarget+Inlining+NGEN
    This PR (5408) - mean (900ms)  : 869, 931
     .   : milestone, 900,
    master - mean (889ms)  : 863, 914
     .   : milestone, 889,

andrewlock avatar Apr 05 '24 13:04 andrewlock

Benchmarks Report for tracer :snail:

Benchmarks for #5408 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.188
  • 1 benchmarks are slower, with geometric mean 1.166
  • 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 :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.73μs 44.3ns 328ns 0.0151 0.00755 0 5.43 KB
master StartStopWithChild netcoreapp3.1 9.83μs 52ns 285ns 0.0186 0.00928 0 5.62 KB
master StartStopWithChild net472 15.9μs 29.6ns 115ns 1.02 0.299 0.0945 6.06 KB
#5408 StartStopWithChild net6.0 8.02μs 45.9ns 331ns 0.0126 0.00421 0 5.43 KB
#5408 StartStopWithChild netcoreapp3.1 9.99μs 55.6ns 343ns 0.0201 0.0101 0 5.62 KB
#5408 StartStopWithChild net472 16.2μs 58.4ns 226ns 1.03 0.31 0.0979 6.07 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 491μs 193ns 697ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 647μs 221ns 796ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 847μs 302ns 1.17μs 0.419 0 0 3.3 KB
#5408 WriteAndFlushEnrichedTraces net6.0 455μs 216ns 806ns 0 0 0 2.7 KB
#5408 WriteAndFlushEnrichedTraces netcoreapp3.1 643μs 358ns 1.24μs 0 0 0 2.7 KB
#5408 WriteAndFlushEnrichedTraces net472 853μs 567ns 2.2μs 0.428 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 202μs 1.18μs 10.1μs 0.198 0 0 18.45 KB
master SendRequest netcoreapp3.1 223μs 1.29μs 11.5μs 0.158 0 0 20.61 KB
master SendRequest net472 0.00222ns 0.000709ns 0.00274ns 0 0 0 0 b
#5408 SendRequest net6.0 193μs 1.09μs 7.76μs 0.187 0 0 18.45 KB
#5408 SendRequest netcoreapp3.1 210μs 511ns 2.17μs 0.219 0 0 20.61 KB
#5408 SendRequest net472 0.00129ns 0.000645ns 0.0025ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 573μs 3.09μs 16.9μs 0.584 0 0 41.59 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 707μs 3.69μs 17.7μs 0.353 0 0 41.71 KB
master WriteAndFlushEnrichedTraces net472 857μs 3.95μs 15.8μs 8.08 2.55 0.425 53.28 KB
#5408 WriteAndFlushEnrichedTraces net6.0 577μs 2.79μs 16.9μs 0.551 0 0 41.64 KB
#5408 WriteAndFlushEnrichedTraces netcoreapp3.1 676μs 3.02μs 15.7μs 0.334 0 0 41.78 KB
#5408 WriteAndFlushEnrichedTraces net472 859μs 3.82μs 14.3μs 8.28 2.48 0.414 53.3 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.22μs 1.39ns 5.37ns 0.014 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.73μs 1.18ns 4.41ns 0.0136 0 0 1.02 KB
master ExecuteNonQuery net472 1.93μs 1.53ns 5.3ns 0.156 0 0 987 B
#5408 ExecuteNonQuery net6.0 1.31μs 1.23ns 4.77ns 0.0144 0 0 1.02 KB
#5408 ExecuteNonQuery netcoreapp3.1 1.75μs 1.15ns 4.16ns 0.0139 0 0 1.02 KB
#5408 ExecuteNonQuery net472 1.97μs 2.68ns 10.4ns 0.157 0 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.13μs 0.725ns 2.81ns 0.0137 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.46μs 0.733ns 2.74ns 0.0133 0 0 976 B
master CallElasticsearch net472 2.48μs 1.32ns 5.12ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.27μs 4.81ns 18.6ns 0.0134 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.68μs 0.66ns 2.47ns 0.0134 0 0 1.02 KB
master CallElasticsearchAsync net472 2.65μs 2.16ns 8.37ns 0.167 0 0 1.05 KB
#5408 CallElasticsearch net6.0 1.23μs 0.701ns 2.53ns 0.0136 0 0 976 B
#5408 CallElasticsearch netcoreapp3.1 1.56μs 1ns 3.87ns 0.0131 0 0 976 B
#5408 CallElasticsearch net472 2.5μs 1.09ns 4.09ns 0.157 0 0 995 B
#5408 CallElasticsearchAsync net6.0 1.27μs 0.598ns 2.16ns 0.0134 0 0 952 B
#5408 CallElasticsearchAsync netcoreapp3.1 1.66μs 1.4ns 5.23ns 0.0133 0 0 1.02 KB
#5408 CallElasticsearchAsync net472 2.64μs 1.86ns 7.19ns 0.167 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.23μs 0.201ns 0.723ns 0.0131 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.68μs 0.772ns 2.89ns 0.0125 0 0 952 B
master ExecuteAsync net472 1.77μs 0.868ns 3.13ns 0.145 0.000892 0 915 B
#5408 ExecuteAsync net6.0 1.24μs 0.538ns 2.01ns 0.013 0 0 952 B
#5408 ExecuteAsync netcoreapp3.1 1.65μs 1.66ns 6.45ns 0.0131 0 0 952 B
#5408 ExecuteAsync net472 1.71μs 0.762ns 2.85ns 0.145 0.000871 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.21μs 1.28ns 4.8ns 0.0316 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.13μs 4.81ns 17.4ns 0.0359 0 0 2.76 KB
master SendAsync net472 7.73μs 2.93ns 11.4ns 0.498 0 0 3.15 KB
#5408 SendAsync net6.0 4.11μs 2.93ns 11.3ns 0.0306 0 0 2.22 KB
#5408 SendAsync netcoreapp3.1 5.05μs 1.51ns 5.45ns 0.0377 0 0 2.76 KB
#5408 SendAsync net472 7.83μs 1.93ns 7.21ns 0.496 0 0 3.15 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.44μs 0.468ns 1.81ns 0.0231 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.28μs 0.91ns 3.52ns 0.0228 0 0 1.64 KB
master EnrichedLog net472 2.72μs 1.36ns 5.08ns 0.249 0 0 1.57 KB
#5408 EnrichedLog net6.0 1.42μs 0.565ns 2.11ns 0.0227 0 0 1.64 KB
#5408 EnrichedLog netcoreapp3.1 2.37μs 2.26ns 8.16ns 0.0224 0 0 1.64 KB
#5408 EnrichedLog net472 2.63μs 1ns 3.76ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 115μs 110ns 427ns 0 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 122μs 174ns 603ns 0 0 0 4.28 KB
master EnrichedLog net472 150μs 194ns 752ns 0.672 0.224 0 4.46 KB
#5408 EnrichedLog net6.0 112μs 95.6ns 370ns 0.0571 0 0 4.28 KB
#5408 EnrichedLog netcoreapp3.1 120μs 155ns 580ns 0 0 0 4.28 KB
#5408 EnrichedLog net472 148μs 121ns 467ns 0.666 0.222 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 3μs 1.55ns 6.01ns 0.0315 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.14μs 1.66ns 6.22ns 0.0293 0 0 2.2 KB
master EnrichedLog net472 4.81μs 1.18ns 4.57ns 0.319 0 0 2.02 KB
#5408 EnrichedLog net6.0 2.86μs 1.13ns 4.38ns 0.03 0 0 2.2 KB
#5408 EnrichedLog netcoreapp3.1 4.03μs 1.16ns 4.35ns 0.0303 0 0 2.2 KB
#5408 EnrichedLog net472 4.8μs 1.09ns 4.08ns 0.32 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.44μs 1.16ns 4.17ns 0.0158 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.79μs 0.774ns 3ns 0.0159 0 0 1.14 KB
master SendReceive net472 2.04μs 0.701ns 2.71ns 0.183 0.00102 0 1.16 KB
#5408 SendReceive net6.0 1.31μs 0.502ns 1.94ns 0.0163 0 0 1.14 KB
#5408 SendReceive netcoreapp3.1 1.68μs 0.674ns 2.52ns 0.0151 0 0 1.14 KB
#5408 SendReceive net472 2.08μs 1.56ns 6.06ns 0.183 0 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.74μs 0.893ns 3.46ns 0.0218 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 4.02μs 1.66ns 6.21ns 0.0221 0 0 1.65 KB
master EnrichedLog net472 4.35μs 2.07ns 7.75ns 0.324 0 0 2.04 KB
#5408 EnrichedLog net6.0 2.89μs 1.15ns 4.47ns 0.0232 0 0 1.6 KB
#5408 EnrichedLog netcoreapp3.1 3.79μs 1.47ns 5.49ns 0.0209 0 0 1.65 KB
#5408 EnrichedLog net472 4.38μs 2.57ns 9.94ns 0.322 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower :warning: Same allocations :heavy_check_mark:

Slower :warning: in #5408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 1.166 662.52 772.82

Faster :tada: in #5408

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 1.188 649.07 546.40

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 393ns 0.118ns 0.458ns 0.0081 0 0 576 B
master StartFinishSpan netcoreapp3.1 648ns 0.765ns 2.96ns 0.00771 0 0 576 B
master StartFinishSpan net472 609ns 0.611ns 2.36ns 0.0915 0 0 578 B
master StartFinishScope net6.0 484ns 0.0864ns 0.311ns 0.00962 0 0 696 B
master StartFinishScope netcoreapp3.1 662ns 0.189ns 0.655ns 0.00963 0 0 696 B
master StartFinishScope net472 897ns 1.34ns 5.21ns 0.104 0 0 658 B
#5408 StartFinishSpan net6.0 404ns 0.198ns 0.741ns 0.00819 0 0 576 B
#5408 StartFinishSpan netcoreapp3.1 546ns 0.286ns 1.07ns 0.00771 0 0 576 B
#5408 StartFinishSpan net472 592ns 0.646ns 2.5ns 0.0915 0 0 578 B
#5408 StartFinishScope net6.0 473ns 0.0754ns 0.282ns 0.00981 0 0 696 B
#5408 StartFinishScope netcoreapp3.1 773ns 0.945ns 3.66ns 0.00941 0 0 696 B
#5408 StartFinishScope net472 843ns 0.446ns 1.61ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 595ns 0.28ns 1.09ns 0.00982 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 885ns 0.322ns 1.25ns 0.00947 0 0 696 B
master RunOnMethodBegin net472 1.15μs 0.331ns 1.24ns 0.105 0 0 658 B
#5408 RunOnMethodBegin net6.0 653ns 0.264ns 0.986ns 0.00991 0 0 696 B
#5408 RunOnMethodBegin netcoreapp3.1 947ns 0.347ns 1.3ns 0.00955 0 0 696 B
#5408 RunOnMethodBegin net472 1.14μs 1.61ns 6.24ns 0.104 0 0 658 B

andrewlock avatar Apr 05 '24 13:04 andrewlock

Benchmarks Report for appsec :snail:

Benchmarks for #5408 compared to master:

  • All benchmarks have the same speed
  • 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.Asm.AppSecBodyBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 73.1μs 72.9ns 282ns 0.0727 0 0 6 KB
master AllCycleSimpleBody netcoreapp3.1 62.7μs 106ns 412ns 0.0933 0 0 6.95 KB
master AllCycleSimpleBody net472 48.1μs 32.6ns 122ns 1.32 0 0 8.34 KB
master AllCycleMoreComplexBody net6.0 79.1μs 90.7ns 351ns 0.118 0 0 9.51 KB
master AllCycleMoreComplexBody netcoreapp3.1 69.4μs 67.5ns 261ns 0.138 0 0 10.36 KB
master AllCycleMoreComplexBody net472 55.1μs 64.5ns 250ns 1.86 0.0278 0 11.85 KB
master ObjectExtractorSimpleBody net6.0 142ns 0.155ns 0.58ns 0.0039 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 203ns 0.235ns 0.909ns 0.00367 0 0 272 B
master ObjectExtractorSimpleBody net472 166ns 0.177ns 0.685ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.18μs 2.69ns 10ns 0.0525 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.99μs 1.55ns 5.99ns 0.0495 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.85μs 1.76ns 6.83ns 0.602 0.00579 0 3.8 KB
#5408 AllCycleSimpleBody net6.0 72.9μs 128ns 497ns 0.0725 0 0 6 KB
#5408 AllCycleSimpleBody netcoreapp3.1 62.8μs 108ns 417ns 0.0935 0 0 6.95 KB
#5408 AllCycleSimpleBody net472 48.2μs 51.9ns 194ns 1.32 0 0 8.34 KB
#5408 AllCycleMoreComplexBody net6.0 77.9μs 94.3ns 365ns 0.116 0 0 9.51 KB
#5408 AllCycleMoreComplexBody netcoreapp3.1 69μs 73.8ns 276ns 0.139 0 0 10.36 KB
#5408 AllCycleMoreComplexBody net472 55.2μs 76.1ns 295ns 1.88 0.0277 0 11.85 KB
#5408 ObjectExtractorSimpleBody net6.0 148ns 0.122ns 0.455ns 0.00393 0 0 280 B
#5408 ObjectExtractorSimpleBody netcoreapp3.1 196ns 0.174ns 0.653ns 0.00367 0 0 272 B
#5408 ObjectExtractorSimpleBody net472 166ns 0.0963ns 0.347ns 0.0446 0 0 281 B
#5408 ObjectExtractorMoreComplexBody net6.0 3.18μs 1.61ns 6.03ns 0.0534 0 0 3.78 KB
#5408 ObjectExtractorMoreComplexBody netcoreapp3.1 4.26μs 2.71ns 10.5ns 0.0492 0 0 3.69 KB
#5408 ObjectExtractorMoreComplexBody net472 3.76μs 2ns 7.49ns 0.602 0.00566 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 36.1μs 21.6ns 81ns 0.454 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54.2μs 18.5ns 66.8ns 0.43 0 0 32.4 KB
master EncodeArgs net472 65.3μs 21.9ns 75.9ns 5.13 0.0654 0 32.5 KB
master EncodeLegacyArgs net6.0 80.3μs 38.6ns 149ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 107μs 289ns 1.12μs 0 0 0 2.14 KB
master EncodeLegacyArgs net472 153μs 139ns 537ns 0.305 0 0 2.15 KB
#5408 EncodeArgs net6.0 38.9μs 24ns 93.1ns 0.446 0 0 32.4 KB
#5408 EncodeArgs netcoreapp3.1 54.9μs 25.1ns 93.8ns 0.436 0 0 32.4 KB
#5408 EncodeArgs net472 66.9μs 57.8ns 224ns 5.14 0.0668 0 32.5 KB
#5408 EncodeLegacyArgs net6.0 75.2μs 406ns 2.3μs 0 0 0 2.14 KB
#5408 EncodeLegacyArgs netcoreapp3.1 107μs 362ns 1.4μs 0 0 0 2.14 KB
#5408 EncodeLegacyArgs net472 152μs 61.2ns 237ns 0.303 0 0 2.15 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 182μs 215ns 833ns 0 0 0 2.42 KB
master RunWafRealisticBenchmark netcoreapp3.1 195μs 222ns 860ns 0 0 0 2.37 KB
master RunWafRealisticBenchmark net472 209μs 196ns 760ns 0.312 0 0 2.43 KB
master RunWafRealisticBenchmarkWithAttack net6.0 121μs 49.9ns 187ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 129μs 73.6ns 285ns 0 0 0 1.45 KB
master RunWafRealisticBenchmarkWithAttack net472 138μs 28.4ns 110ns 0.206 0 0 1.48 KB
#5408 RunWafRealisticBenchmark net6.0 183μs 227ns 878ns 0 0 0 2.42 KB
#5408 RunWafRealisticBenchmark netcoreapp3.1 194μs 216ns 837ns 0 0 0 2.37 KB
#5408 RunWafRealisticBenchmark net472 207μs 68.6ns 266ns 0.31 0 0 2.43 KB
#5408 RunWafRealisticBenchmarkWithAttack net6.0 121μs 47.9ns 185ns 0 0 0 1.46 KB
#5408 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 129μs 183ns 709ns 0 0 0 1.45 KB
#5408 RunWafRealisticBenchmarkWithAttack net472 138μs 53.9ns 209ns 0.207 0 0 1.48 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed :heavy_check_mark: More allocations :warning:

More allocations :warning: in #5408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 254.32 KB 266.32 KB 12 KB 4.72%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 60.8μs 736ns 7.32μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 60.9μs 768ns 7.56μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 38.1μs 202ns 990ns 0 0 0 57.8 KB
master StringConcatAspectBenchmark net6.0 293μs 6.03μs 58.8μs 0 0 0 254.32 KB
master StringConcatAspectBenchmark netcoreapp3.1 345μs 1.43μs 5.17μs 0 0 0 264.23 KB
master StringConcatAspectBenchmark net472 293μs 6.97μs 67.5μs 0 0 0 278.53 KB
#5408 StringConcatBenchmark net6.0 59.2μs 705ns 6.97μs 0 0 0 43.44 KB
#5408 StringConcatBenchmark netcoreapp3.1 63μs 872ns 8.72μs 0 0 0 42.64 KB
#5408 StringConcatBenchmark net472 39.1μs 214ns 1.29μs 0 0 0 57.7 KB
#5408 StringConcatAspectBenchmark net6.0 285μs 4.82μs 47.8μs 0 0 0 266.32 KB
#5408 StringConcatAspectBenchmark netcoreapp3.1 344μs 1.81μs 10.1μs 0 0 0 263.89 KB
#5408 StringConcatAspectBenchmark net472 285μs 5.78μs 56.1μs 0 0 0 278.53 KB

andrewlock avatar Apr 05 '24 14:04 andrewlock

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 (5408) (11.358M)   : 0, 11358091
    master (11.270M)   : 0, 11270037
    benchmarks/2.9.0 (11.588M)   : 0, 11588162

    section Automatic
    This PR (5408) (7.638M)   : 0, 7638321
    master (7.528M)   : 0, 7527796
    benchmarks/2.9.0 (8.134M)   : 0, 8134412

    section Trace stats
    master (7.821M)   : 0, 7820744

    section Manual
    master (9.646M)   : 0, 9645628

    section Manual + Automatic
    This PR (5408) (7.169M)   : 0, 7168720
    master (7.078M)   : 0, 7078188

gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5408) (9.652M)   : 0, 9652137
    master (9.334M)   : 0, 9334102
    benchmarks/2.9.0 (9.524M)   : 0, 9523985

    section Automatic
    This PR (5408) (6.623M)   : 0, 6623007
    master (6.546M)   : 0, 6545791

    section Trace stats
    master (6.891M)   : 0, 6890963

    section Manual
    master (8.250M)   : 0, 8249672

    section Manual + Automatic
    This PR (5408) (6.174M)   : 0, 6173856
    master (6.217M)   : 0, 6216964

gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5408) (10.088M)   : 0, 10088005

    section Automatic
    This PR (5408) (7.253M)   : 0, 7252675

    section Manual + Automatic
    This PR (5408) (6.869M)   : 0, 6869175

andrewlock avatar Apr 09 '24 22:04 andrewlock

Datadog Report

Branch report: v3-main Commit report: 0363c63 Test service: dd-trace-dotnet

:white_check_mark: 0 Failed, 444911 Passed, 3430 Skipped, 68h 18m 44.65s Total Time :hourglass: 1 Performance Regression

:hourglass: Performance Regressions vs Default Branch (1)

  • StringConcatAspectBenchmark - Benchmarks.Trace.Iast.StringAspectsBenchmark 610.46µs (+270.86µs, +80%) - Details

datadog-ddstaging[bot] avatar May 24 '24 09:05 datadog-ddstaging[bot]

we'll use a fast forward merge or an explicit merge commit.

The answer is clear.

edit: sorry, what I meant was, I think most (all?) of us prefer not having any merge commits, so unless there's a technical reason blocking us from using fast-forward merge, then I assume that's what we're doing? Each commit will still be a single PR (right?), like we've always done in master.

lucaspimentel avatar Jul 19 '24 18:07 lucaspimentel