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

Small fixes for MockTracerAgent and MockHttpParser parsing #4988

Merged
merged 13 commits into from
Dec 27, 2023

Conversation

andrewlock
Copy link
Member

@andrewlock andrewlock commented Dec 19, 2023

Summary of changes

  • Don't return a 200 OK if an error occurs parsing a request
  • Extract HTTP stream-reading helpers into separate class
  • Don't include the \0 in the parsed HTTP method
  • Ensure MockTracerAgent handles different types of evp_proxy requests correctly

Reason for change

Ran into these issues when working on the tracer flare.

Implementation details

Easiest to review the commits individually - the "extract" commit is a very simple cut and paste

Test coverage

All covered by existing (or don't care enough to create tests for it 😅)

Other details

Prerequisite for other stacked PRs

Stacked on

@andrewlock andrewlock added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:tests unit tests, integration tests labels Dec 19, 2023
@andrewlock andrewlock requested a review from a team as a code owner December 19, 2023 15:02
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Dec 19, 2023

Datadog Report

Branch report: andrew/tracer_flare/mock_agent_prereq
Commit report: f8f133f

dd-trace-dotnet: 0 Failed, 0 New Flaky, 301852 Passed, 994 Skipped, 26m 2.43s Wall Time

@andrewlock
Copy link
Member Author

andrewlock commented Dec 19, 2023

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 (4988) - mean (72ms)  : 64, 79
     .   : milestone, 72,
    master - mean (72ms)  : 63, 81
     .   : milestone, 72,

    section CallTarget+Inlining+NGEN
    This PR (4988) - mean (1,020ms)  : 994, 1046
     .   : milestone, 1020,
    master - mean (1,018ms)  : 985, 1051
     .   : milestone, 1018,

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

    section CallTarget+Inlining+NGEN
    This PR (4988) - mean (727ms)  : 706, 747
     .   : milestone, 727,
    master - mean (724ms)  : 706, 742
     .   : milestone, 724,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4988) - mean (90ms)  : 87, 93
     .   : milestone, 90,
    master - mean (90ms)  : 86, 93
     .   : milestone, 90,

    section CallTarget+Inlining+NGEN
    This PR (4988) - mean (689ms)  : 665, 714
     .   : milestone, 689,
    master - mean (690ms)  : 669, 710
     .   : milestone, 690,

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

    section CallTarget+Inlining+NGEN
    This PR (4988) - mean (1,129ms)  : 1103, 1154
     .   : milestone, 1129,
    master - mean (1,130ms)  : 1105, 1155
     .   : milestone, 1130,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4988) - mean (277ms)  : 251, 303
     .   : milestone, 277,
    master - mean (272ms)  : 268, 276
     .   : milestone, 272,

    section CallTarget+Inlining+NGEN
    This PR (4988) - mean (1,084ms)  : 1055, 1113
     .   : milestone, 1084,
    master - mean (1,081ms)  : 1051, 1111
     .   : milestone, 1081,

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

    section CallTarget+Inlining+NGEN
    This PR (4988) - mean (1,050ms)  : 1021, 1078
     .   : milestone, 1050,
    master - mean (1,055ms)  : 1035, 1075
     .   : milestone, 1055,

Loading

@andrewlock
Copy link
Member Author

andrewlock commented Dec 19, 2023

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 (4988) (11.145M)   : 0, 11144909
    master (11.404M)   : 0, 11404456
    benchmarks/2.9.0 (11.039M)   : 0, 11039399

    section Automatic
    This PR (4988) (7.654M)   : 0, 7653781
    master (7.741M)   : 0, 7741013
    benchmarks/2.9.0 (7.826M)   : 0, 7826018

    section Trace stats
    This PR (4988) (7.974M)   : 0, 7973667
    master (8.126M)   : 0, 8125736

    section Manual
    This PR (4988) (7.200M)   : crit ,0, 7200281
    master (9.843M)   : 0, 9842783

    section Manual + Automatic
    This PR (4988) (7.241M)   : 0, 7240566
    master (7.393M)   : 0, 7393352

    section Version Conflict
    This PR (4988) (6.506M)   : 0, 6506442
    master (6.723M)   : 0, 6722610

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4988) (9.519M)   : 0, 9519268
    master (9.536M)   : 0, 9536478
    benchmarks/2.9.0 (9.524M)   : 0, 9524378

    section Automatic
    This PR (4988) (6.660M)   : 0, 6659887
    master (6.633M)   : 0, 6632711

    section Trace stats
    This PR (4988) (6.835M)   : 0, 6835305
    master (6.937M)   : 0, 6936943

    section Manual
    This PR (4988) (8.360M)   : 0, 8359954
    master (8.252M)   : 0, 8251753

    section Manual + Automatic
    This PR (4988) (6.160M)   : 0, 6160385
    master (6.254M)   : 0, 6254269

    section Version Conflict
    This PR (4988) (5.699M)   : 0, 5699254
    master (5.759M)   : 0, 5758783

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4988) (10.698M)   : 0, 10698174
    master (10.210M)   : 0, 10209665
    benchmarks/2.9.0 (10.595M)   : 0, 10595111

    section Automatic
    This PR (4988) (7.515M)   : 0, 7514817
    master (7.285M)   : 0, 7284561
    benchmarks/2.9.0 (7.715M)   : 0, 7714713

    section Trace stats
    This PR (4988) (7.906M)   : 0, 7906057
    master (7.673M)   : 0, 7673413

    section Manual
    This PR (4988) (9.443M)   : 0, 9442984
    master (9.023M)   : 0, 9023235

    section Manual + Automatic
    This PR (4988) (7.345M)   : 0, 7344904
    master (7.016M)   : 0, 7016276

    section Version Conflict
    This PR (4988) (6.548M)   : 0, 6548352
    master (6.285M)   : 0, 6285384

Loading
gantt
    title Throughput Linux x64 (ASM) (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    master (7.361M)   : 0, 7361101
    benchmarks/2.9.0 (7.881M)   : 0, 7880675

    section No attack
    master (1.955M)   : 0, 1954953
    benchmarks/2.9.0 (3.229M)   : 0, 3228505

    section Attack
    master (1.584M)   : 0, 1584237
    benchmarks/2.9.0 (2.543M)   : 0, 2543336

    section Blocking
    master (3.264M)   : 0, 3263612

    section IAST default
    master (6.495M)   : 0, 6495234

    section IAST full
    master (5.786M)   : 0, 5785757

    section Base vuln
    master (0.950M)   : 0, 949794

    section IAST vuln
    master (0.851M)   : 0, 851028

Loading

@andrewlock
Copy link
Member Author

andrewlock commented Dec 19, 2023

Benchmarks Report 🐌

Benchmarks for #4988 compared to master:

  • 2 benchmarks are slower, with geometric mean 1.156
  • 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 8.58μs 48.3ns 313ns 0.0266 0.0133 0 7.48 KB
master StartStopWithChild netcoreapp3.1 10.6μs 51.4ns 218ns 0.0266 0.0106 0 7.58 KB
master StartStopWithChild net472 17μs 67.1ns 251ns 1.34 0.359 0.12 7.95 KB
#4988 StartStopWithChild net6.0 8.79μs 48.9ns 320ns 0.0215 0.00859 0 7.48 KB
#4988 StartStopWithChild netcoreapp3.1 10.7μs 59.8ns 387ns 0.0266 0.0106 0 7.58 KB
#4988 StartStopWithChild net472 16.7μs 57ns 205ns 1.33 0.342 0.108 7.96 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 462μs 287ns 1.11μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 618μs 133ns 496ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 792μs 508ns 1.9μs 0.396 0 0 3.3 KB
#4988 WriteAndFlushEnrichedTraces net6.0 453μs 170ns 658ns 0 0 0 2.7 KB
#4988 WriteAndFlushEnrichedTraces netcoreapp3.1 633μs 311ns 1.12μs 0 0 0 2.7 KB
#4988 WriteAndFlushEnrichedTraces net472 788μs 271ns 1.01μs 0.393 0 0 3.3 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 43.8μs 16.5ns 64ns 0.0219 0 0 1.77 KB
master AllCycleSimpleBody netcoreapp3.1 46.8μs 96.5ns 374ns 0.0234 0 0 1.74 KB
master AllCycleSimpleBody net472 49.3μs 80.1ns 310ns 0.275 0 0 1.81 KB
master AllCycleMoreComplexBody net6.0 214μs 117ns 437ns 0.107 0 0 9.25 KB
master AllCycleMoreComplexBody netcoreapp3.1 226μs 261ns 976ns 0.112 0 0 9.14 KB
master AllCycleMoreComplexBody net472 238μs 94.4ns 365ns 1.42 0 0 9.32 KB
master ObjectExtractorSimpleBody net6.0 134ns 0.0226ns 0.0814ns 0.00394 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 208ns 0.0946ns 0.354ns 0.00366 0 0 272 B
master ObjectExtractorSimpleBody net472 154ns 0.0707ns 0.274ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 2.83μs 0.811ns 3.04ns 0.0537 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.64μs 0.909ns 3.52ns 0.0493 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.42μs 1.36ns 5.29ns 0.602 0.00515 0 3.8 KB
#4988 AllCycleSimpleBody net6.0 43.9μs 26.8ns 104ns 0.0221 0 0 1.77 KB
#4988 AllCycleSimpleBody netcoreapp3.1 47μs 91.9ns 344ns 0.0233 0 0 1.74 KB
#4988 AllCycleSimpleBody net472 50.1μs 42.4ns 164ns 0.27 0 0 1.81 KB
#4988 AllCycleMoreComplexBody net6.0 212μs 71.6ns 277ns 0.107 0 0 9.25 KB
#4988 AllCycleMoreComplexBody netcoreapp3.1 226μs 349ns 1.26μs 0.113 0 0 9.14 KB
#4988 AllCycleMoreComplexBody net472 237μs 101ns 391ns 1.42 0 0 9.32 KB
#4988 ObjectExtractorSimpleBody net6.0 133ns 0.0374ns 0.14ns 0.00394 0 0 280 B
#4988 ObjectExtractorSimpleBody netcoreapp3.1 186ns 0.448ns 1.73ns 0.00368 0 0 272 B
#4988 ObjectExtractorSimpleBody net472 152ns 0.148ns 0.574ns 0.0446 0 0 281 B
#4988 ObjectExtractorMoreComplexBody net6.0 2.78μs 1.29ns 4.83ns 0.0528 0 0 3.78 KB
#4988 ObjectExtractorMoreComplexBody netcoreapp3.1 3.62μs 2.06ns 7.72ns 0.0505 0 0 3.69 KB
#4988 ObjectExtractorMoreComplexBody net472 3.46μs 2.19ns 8.5ns 0.603 0.00517 0 3.8 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWaf(args=NestedMap (10)) net6.0 56μs 281ns 1.23μs 0.225 0 0 16.06 KB
master RunWaf(args=NestedMap (10)) netcoreapp3.1 69μs 393ns 2.94μs 0.193 0 0 16.06 KB
master RunWaf(args=NestedMap (10)) net472 94μs 44.4ns 172ns 2.54 0.0941 0 16.14 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 120μs 325ns 1.26μs 0.291 0 0 22.41 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 136μs 329ns 1.23μs 0.271 0 0 22.36 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net472 171μs 158ns 591ns 3.59 0.167 0 22.7 KB
master RunWaf(args=NestedMap (100)) net6.0 101μs 550ns 2.96μs 0.434 0 0 32.76 KB
master RunWaf(args=NestedMap (100)) netcoreapp3.1 133μs 739ns 4.49μs 0.434 0 0 33.33 KB
master RunWaf(args=NestedMap (100)) net472 192μs 964ns 4.09μs 5.27 0.37 0 33.67 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) net6.0 164μs 72.9ns 263ns 0.517 0 0 39.1 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) netcoreapp3.1 206μs 1.06μs 4.73μs 0.505 0 0 39.63 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) net472 275μs 213ns 826ns 6.3 0.411 0 40.23 KB
master RunWaf(args=NestedMap (20)) net6.0 103μs 161ns 602ns 0.42 0 0 32.18 KB
master RunWaf(args=NestedMap (20)) netcoreapp3.1 132μs 705ns 3.93μs 0.407 0 0 32.3 KB
master RunWaf(args=NestedMap (20)) net472 182μs 238ns 920ns 5.19 0.364 0 32.63 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 174μs 116ns 420ns 0.53 0 0 38.53 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 209μs 1.07μs 5.04μs 0.514 0 0 38.6 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net472 278μs 143ns 554ns 6.16 0.393 0 39.2 KB
#4988 RunWaf(args=NestedMap (10)) net6.0 56.7μs 33.5ns 121ns 0.207 0 0 16.06 KB
#4988 RunWaf(args=NestedMap (10)) netcoreapp3.1 69.6μs 326ns 1.34μs 0.214 0 0 16.06 KB
#4988 RunWaf(args=NestedMap (10)) net472 99.6μs 36.9ns 143ns 2.56 0.0948 0 16.14 KB
#4988 RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 116μs 78.8ns 273ns 0.306 0 0 22.41 KB
#4988 RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 144μs 730ns 3.26μs 0.277 0 0 22.36 KB
#4988 RunWafWithAttack(args=Neste(...)tack) [22]) net472 178μs 99.9ns 387ns 3.56 0.169 0 22.7 KB
#4988 RunWaf(args=NestedMap (100)) net6.0 95.7μs 114ns 443ns 0.415 0 0 32.76 KB
#4988 RunWaf(args=NestedMap (100)) netcoreapp3.1 132μs 701ns 3.71μs 0.394 0 0 33.33 KB
#4988 RunWaf(args=NestedMap (100)) net472 185μs 114ns 442ns 5.31 0.366 0 33.67 KB
#4988 RunWafWithAttack(args=Neste(...)tack) [23]) net6.0 164μs 35.6ns 138ns 0.493 0 0 39.1 KB
#4988 RunWafWithAttack(args=Neste(...)tack) [23]) netcoreapp3.1 209μs 710ns 2.75μs 0.537 0 0 39.63 KB
#4988 RunWafWithAttack(args=Neste(...)tack) [23]) net472 269μs 132ns 511ns 6.32 0.403 0 40.23 KB
#4988 RunWaf(args=NestedMap (20)) net6.0 97.3μs 18.3ns 65.9ns 0.438 0 0 32.18 KB
#4988 RunWaf(args=NestedMap (20)) netcoreapp3.1 130μs 673ns 3.43μs 0.443 0 0 32.3 KB
#4988 RunWaf(args=NestedMap (20)) net472 190μs 126ns 489ns 5.17 0.363 0 32.63 KB
#4988 RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 177μs 86.2ns 334ns 0.52 0 0 38.53 KB
#4988 RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 211μs 379ns 1.47μs 0.515 0 0 38.6 KB
#4988 RunWafWithAttack(args=Neste(...)tack) [22]) net472 264μs 206ns 799ns 6.12 0.521 0 39.2 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 172μs 184ns 687ns 0.172 0 0 18.25 KB
master SendRequest netcoreapp3.1 191μs 261ns 1.01μs 0.19 0 0 20.41 KB
master SendRequest net472 0.000527ns 0.00024ns 0.000897ns 0 0 0 0 b
#4988 SendRequest net6.0 172μs 660ns 3.02μs 0.256 0 0 18.25 KB
#4988 SendRequest netcoreapp3.1 192μs 268ns 1.04μs 0.191 0 0 20.41 KB
#4988 SendRequest net472 0.000522ns 0.00023ns 0.000892ns 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 847ns 3.06μs 0.571 0 0 41.82 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 660μs 349ns 1.26μs 0.332 0 0 41.71 KB
master WriteAndFlushEnrichedTraces net472 845μs 4.19μs 19.2μs 8.08 2.55 0.425 53.23 KB
#4988 WriteAndFlushEnrichedTraces net6.0 548μs 1.79μs 6.95μs 0.534 0 0 41.9 KB
#4988 WriteAndFlushEnrichedTraces netcoreapp3.1 656μs 782ns 3.03μs 0.326 0 0 41.7 KB
#4988 WriteAndFlushEnrichedTraces net472 862μs 4.17μs 16.7μs 8.08 2.55 0.425 53.21 KB
Benchmarks.Trace.DbCommandBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #4988

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net472 1.113 1,704.67 1,896.94

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.12μs 0.553ns 2.14ns 0.0106 0 0 768 B
master ExecuteNonQuery netcoreapp3.1 1.49μs 0.499ns 1.87ns 0.0105 0 0 768 B
master ExecuteNonQuery net472 1.7μs 0.655ns 2.54ns 0.115 0.000856 0 730 B
#4988 ExecuteNonQuery net6.0 1.1μs 0.539ns 2.09ns 0.0106 0 0 768 B
#4988 ExecuteNonQuery netcoreapp3.1 1.44μs 0.485ns 1.88ns 0.00995 0 0 768 B
#4988 ExecuteNonQuery net472 1.9μs 0.481ns 1.86ns 0.116 0 0 730 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.27μs 0.305ns 1.14ns 0.0135 0 0 936 B
master CallElasticsearch netcoreapp3.1 1.49μs 0.941ns 3.64ns 0.0122 0 0 936 B
master CallElasticsearch net472 2.39μs 0.515ns 2ns 0.151 0 0 955 B
master CallElasticsearchAsync net6.0 1.37μs 0.703ns 2.63ns 0.0128 0 0 912 B
master CallElasticsearchAsync netcoreapp3.1 1.55μs 1.15ns 4.47ns 0.0135 0 0 984 B
master CallElasticsearchAsync net472 2.64μs 0.921ns 3.57ns 0.16 0 0 1.01 KB
#4988 CallElasticsearch net6.0 1.24μs 0.553ns 2.14ns 0.013 0 0 936 B
#4988 CallElasticsearch netcoreapp3.1 1.49μs 0.727ns 2.82ns 0.0126 0 0 936 B
#4988 CallElasticsearch net472 2.45μs 1.09ns 4.08ns 0.151 0.00123 0 955 B
#4988 CallElasticsearchAsync net6.0 1.33μs 0.592ns 2.21ns 0.0127 0 0 912 B
#4988 CallElasticsearchAsync netcoreapp3.1 1.63μs 2.05ns 7.4ns 0.0129 0 0 984 B
#4988 CallElasticsearchAsync net472 2.71μs 0.412ns 1.43ns 0.16 0.00136 0 1.01 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.28μs 1.18ns 4.55ns 0.0127 0 0 912 B
master ExecuteAsync netcoreapp3.1 1.56μs 0.872ns 3.26ns 0.0123 0 0 912 B
master ExecuteAsync net472 1.76μs 0.991ns 3.84ns 0.139 0.000877 0 875 B
#4988 ExecuteAsync net6.0 1.27μs 0.825ns 3.2ns 0.0127 0 0 912 B
#4988 ExecuteAsync netcoreapp3.1 1.65μs 1ns 3.47ns 0.0123 0 0 912 B
#4988 ExecuteAsync net472 1.85μs 0.824ns 3.19ns 0.138 0 0 875 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 3.93μs 5.11ns 19.1ns 0.0293 0 0 2.1 KB
master SendAsync netcoreapp3.1 4.75μs 1.27ns 4.58ns 0.0356 0 0 2.63 KB
master SendAsync net472 7.69μs 2.06ns 7.97ns 0.525 0 0 3.31 KB
#4988 SendAsync net6.0 4.14μs 1.94ns 7.26ns 0.029 0 0 2.1 KB
#4988 SendAsync netcoreapp3.1 4.87μs 1.22ns 4.57ns 0.034 0 0 2.63 KB
#4988 SendAsync net472 7.73μs 1.89ns 7.31ns 0.525 0 0 3.31 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) net6.0 53.8μs 306ns 2.14μs 0 0 0 43.44 KB
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 63μs 912ns 9.07μs 0 0 0 42.64 KB
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) net472 38.9μs 216ns 1.7μs 0 0 0 57.95 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net6.0 111μs 2.6μs 26μs 0 0 0 43.29 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 112μs 2.81μs 28.1μs 0 0 0 42.64 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net472 68.8μs 601ns 5.89μs 0 0 0 65.54 KB
#4988 StringConcatBenchmark(parameters=Syste(...)ring] [48]) net6.0 54.6μs 314ns 2.37μs 0 0 0 43.44 KB
#4988 StringConcatBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 57.5μs 323ns 2.48μs 0 0 0 42.64 KB
#4988 StringConcatBenchmark(parameters=Syste(...)ring] [48]) net472 41.5μs 238ns 1.78μs 0 0 0 58.03 KB
#4988 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net6.0 115μs 2.96μs 29.6μs 0 0 0 43.29 KB
#4988 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 121μs 3.83μs 37.9μs 0 0 0 42.64 KB
#4988 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net472 69.2μs 1μs 9.78μs 0 0 0 65.54 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.46μs 0.403ns 1.56ns 0.0218 0 0 1.57 KB
master EnrichedLog netcoreapp3.1 2.3μs 1.86ns 6.96ns 0.0207 0 0 1.57 KB
master EnrichedLog net472 2.64μs 1.91ns 7.15ns 0.237 0 0 1.5 KB
#4988 EnrichedLog net6.0 1.43μs 5.59ns 21.6ns 0.0224 0 0 1.57 KB
#4988 EnrichedLog netcoreapp3.1 2.12μs 1.09ns 4.21ns 0.021 0 0 1.57 KB
#4988 EnrichedLog net472 2.68μs 2.39ns 9.26ns 0.237 0 0 1.5 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 225ns 870ns 0.0562 0 0 4.21 KB
master EnrichedLog netcoreapp3.1 119μs 206ns 799ns 0.0585 0 0 4.21 KB
master EnrichedLog net472 149μs 204ns 788ns 0.674 0.225 0 4.39 KB
#4988 EnrichedLog net6.0 115μs 68.2ns 255ns 0 0 0 4.21 KB
#4988 EnrichedLog netcoreapp3.1 120μs 172ns 667ns 0.0594 0 0 4.21 KB
#4988 EnrichedLog net472 149μs 228ns 884ns 0.67 0.223 0 4.39 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μs 1.72ns 6.68ns 0.0297 0 0 2.13 KB
master EnrichedLog netcoreapp3.1 4.21μs 0.996ns 3.45ns 0.0293 0 0 2.13 KB
master EnrichedLog net472 4.89μs 1.78ns 6.9ns 0.308 0 0 1.95 KB
#4988 EnrichedLog net6.0 2.96μs 0.949ns 3.42ns 0.0295 0 0 2.13 KB
#4988 EnrichedLog netcoreapp3.1 4.24μs 1.09ns 3.94ns 0.0276 0 0 2.13 KB
#4988 EnrichedLog net472 4.75μs 1.01ns 3.77ns 0.309 0 0 1.95 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.3μs 0.71ns 2.66ns 0.0155 0 0 1.1 KB
master SendReceive netcoreapp3.1 1.74μs 4.29ns 16.6ns 0.0145 0 0 1.1 KB
master SendReceive net472 2.08μs 2.82ns 10.9ns 0.177 0 0 1.12 KB
#4988 SendReceive net6.0 1.35μs 0.959ns 3.72ns 0.0155 0 0 1.1 KB
#4988 SendReceive netcoreapp3.1 1.74μs 0.58ns 2.25ns 0.0147 0 0 1.1 KB
#4988 SendReceive net472 2.11μs 0.845ns 2.93ns 0.177 0 0 1.12 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.63μs 1.05ns 4.06ns 0.0209 0 0 1.53 KB
master EnrichedLog netcoreapp3.1 3.93μs 1.91ns 7.39ns 0.0195 0 0 1.58 KB
master EnrichedLog net472 4.38μs 1.3ns 4.85ns 0.311 0 0 1.97 KB
#4988 EnrichedLog net6.0 2.59μs 0.594ns 2.22ns 0.0207 0 0 1.53 KB
#4988 EnrichedLog netcoreapp3.1 3.81μs 1.55ns 6ns 0.0209 0 0 1.58 KB
#4988 EnrichedLog net472 4.33μs 2.46ns 9.52ns 0.312 0 0 1.97 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #4988

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.200 538.35 646.05

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 461ns 0.226ns 0.877ns 0.00762 0 0 536 B
master StartFinishSpan netcoreapp3.1 757ns 0.283ns 1.1ns 0.00707 0 0 536 B
master StartFinishSpan net472 770ns 0.275ns 1.07ns 0.0854 0 0 538 B
master StartFinishScope net6.0 539ns 0.631ns 2.44ns 0.00919 0 0 656 B
master StartFinishScope netcoreapp3.1 859ns 0.436ns 1.69ns 0.00887 0 0 656 B
master StartFinishScope net472 1.02μs 0.958ns 3.71ns 0.0981 0 0 618 B
#4988 StartFinishSpan net6.0 507ns 0.145ns 0.542ns 0.00752 0 0 536 B
#4988 StartFinishSpan netcoreapp3.1 764ns 0.228ns 0.822ns 0.00727 0 0 536 B
#4988 StartFinishSpan net472 823ns 0.593ns 2.3ns 0.0851 0 0 538 B
#4988 StartFinishScope net6.0 646ns 0.115ns 0.43ns 0.00907 0 0 656 B
#4988 StartFinishScope netcoreapp3.1 862ns 0.409ns 1.42ns 0.00866 0 0 656 B
#4988 StartFinishScope net472 1.02μs 0.381ns 1.48ns 0.0979 0 0 618 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 587ns 0.376ns 1.46ns 0.00929 0 0 656 B
master RunOnMethodBegin netcoreapp3.1 943ns 0.355ns 1.37ns 0.00904 0 0 656 B
master RunOnMethodBegin net472 1.06μs 0.367ns 1.37ns 0.0981 0 0 618 B
#4988 RunOnMethodBegin net6.0 645ns 0.291ns 1.09ns 0.00931 0 0 656 B
#4988 RunOnMethodBegin netcoreapp3.1 892ns 0.357ns 1.34ns 0.00899 0 0 656 B
#4988 RunOnMethodBegin net472 1.1μs 1.67ns 6.45ns 0.0981 0 0 618 B

@andrewlock andrewlock force-pushed the andrew/tracer_flare/mock_agent_prereq branch from 0ca4914 to f8f133f Compare December 27, 2023 10:54
Base automatically changed from andrew/tracer_flare/log_reader to master December 27, 2023 13:28
@andrewlock andrewlock merged commit 4493d4d into master Dec 27, 2023
48 of 51 checks passed
@andrewlock andrewlock deleted the andrew/tracer_flare/mock_agent_prereq branch December 27, 2023 13:29
@github-actions github-actions bot added this to the vNext milestone Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tests unit tests, integration tests area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants