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

Minor fixes for build warnings in samples #6491

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

Conversation

andrewlock
Copy link
Member

Summary of changes

Fixes some build warnings coming from the samples

Reason for change

Warnings are annoying

Implementation details

Tries to fix the following warnings:

##[warning]D:\a\1\s\tracer\test\test-applications\integrations\Samples.AspNetCoreMvc21\Controllers\ApiController.cs(35,17): warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key. (https://aka.ms/aspnet/analyzers)

##[warning]D:\a\_tool\dotnet\sdk\9.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(322,5): warning NETSDK1206: Found version-specific or distribution-specific runtime identifier(s): alpine-x64. Affected libraries: SQLitePCLRaw.lib.e_sqlite3. In .NET 8.0 and higher, assets for version-specific and distribution-specific runtime identifiers will not be found by default. See https://aka.ms/dotnet/rid-usage for details. [D:\a\1\s\tracer\test\test-applications\integrations\Samples.Microsoft.Data.Sqlite\Samples.Microsoft.Data.Sqlite.csproj::TargetFramework=net8.0]

##[warning]D:\a\1\s\tracer\test\test-applications\debugger\dependency-libs\Samples.Probes.TestRuns\ExceptionReplay\ExceptionWithNonSupportedFramesTest.cs(30,27): warning CS0649: Field 'ExceptionWithNonSupportedFramesTest.MeRefStruct.Field' is never assigned to, and will always have its default value null

##[warning]D:\a\1\s\tracer\test\test-applications\security\Samples.Security.AspNetCore5\Controllers\IastController.cs(77,38): warning CS0414: The field 'IastController._dbConnectionSystemDataSqlClient' is assigned but its value is never used

##[warning]D:\a\1\s\tracer\test\test-applications\debugger\Samples.Debugger.AspNetCore5\Controllers\HomeController.cs(32,13): warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key. (https://aka.ms/aspnet/analyzers)

Test coverage

This PR is the test

@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Dec 31, 2024
@andrewlock andrewlock requested review from a team as code owners December 31, 2024 11:42
@github-actions github-actions bot added the area:tests unit tests, integration tests label Dec 31, 2024
@andrewlock
Copy link
Member Author

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6491) - mean (68ms)  : 66, 71
     .   : milestone, 68,
    master - mean (69ms)  : 64, 73
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6491) - mean (976ms)  : 950, 1002
     .   : milestone, 976,
    master - mean (976ms)  : 946, 1006
     .   : milestone, 976,

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

    section CallTarget+Inlining+NGEN
    This PR (6491) - mean (675ms)  : 662, 688
     .   : milestone, 675,
    master - mean (677ms)  : 659, 694
     .   : milestone, 677,

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

    section CallTarget+Inlining+NGEN
    This PR (6491) - mean (632ms)  : 617, 648
     .   : milestone, 632,
    master - mean (629ms)  : 614, 643
     .   : milestone, 629,

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

    section CallTarget+Inlining+NGEN
    This PR (6491) - mean (1,100ms)  : 1065, 1135
     .   : milestone, 1100,
    master - mean (1,099ms)  : 1070, 1129
     .   : milestone, 1099,

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

    section CallTarget+Inlining+NGEN
    This PR (6491) - mean (869ms)  : 836, 902
     .   : milestone, 869,
    master - mean (874ms)  : 844, 903
     .   : milestone, 874,

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

    section CallTarget+Inlining+NGEN
    This PR (6491) - mean (851ms)  : 821, 880
     .   : milestone, 851,
    master - mean (846ms)  : 819, 873
     .   : milestone, 846,

Loading

@andrewlock
Copy link
Member Author

Benchmarks Report for appsec 🐌

Benchmarks for #6491 compared to master:

  • 1 benchmarks are slower, with geometric mean 1.177
  • 1 benchmarks have fewer allocations
  • 2 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 ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 204μs 112ns 404ns 2.65 0 0 188.76 KB
master AllCycleSimpleBody netcoreapp3.1 305μs 161ns 580ns 2.59 0 0 196.09 KB
master AllCycleSimpleBody net472 274μs 377ns 1.46μs 35.8 2.05 0 225.78 KB
master AllCycleMoreComplexBody net6.0 211μs 95.8ns 371ns 2.68 0 0 192.26 KB
master AllCycleMoreComplexBody netcoreapp3.1 316μs 163ns 610ns 2.68 0 0 199.5 KB
master AllCycleMoreComplexBody net472 276μs 139ns 539ns 36.4 2.07 0 229.3 KB
master ObjectExtractorSimpleBody net6.0 141ns 0.0887ns 0.32ns 0.00398 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 194ns 0.101ns 0.379ns 0.00372 0 0 272 B
master ObjectExtractorSimpleBody net472 163ns 0.11ns 0.424ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 2.98μs 1.7ns 6.12ns 0.0537 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.86μs 1.65ns 6.38ns 0.0502 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.65μs 5.63ns 21.8ns 0.602 0.00549 0 3.8 KB
#6491 AllCycleSimpleBody net6.0 206μs 131ns 491ns 2.67 0 0 188.76 KB
#6491 AllCycleSimpleBody netcoreapp3.1 297μs 99.9ns 360ns 2.68 0 0 196.09 KB
#6491 AllCycleSimpleBody net472 274μs 119ns 427ns 35.9 2.06 0 225.78 KB
#6491 AllCycleMoreComplexBody net6.0 210μs 98.3ns 368ns 2.74 0 0 192.27 KB
#6491 AllCycleMoreComplexBody netcoreapp3.1 317μs 140ns 525ns 2.7 0 0 199.5 KB
#6491 AllCycleMoreComplexBody net472 281μs 161ns 622ns 36.4 1.99 0 229.3 KB
#6491 ObjectExtractorSimpleBody net6.0 138ns 0.161ns 0.603ns 0.00389 0 0 280 B
#6491 ObjectExtractorSimpleBody netcoreapp3.1 186ns 0.105ns 0.406ns 0.00377 0 0 272 B
#6491 ObjectExtractorSimpleBody net472 161ns 0.0708ns 0.274ns 0.0446 0 0 281 B
#6491 ObjectExtractorMoreComplexBody net6.0 2.88μs 2.26ns 8.14ns 0.0531 0 0 3.78 KB
#6491 ObjectExtractorMoreComplexBody netcoreapp3.1 3.92μs 2.8ns 10.8ns 0.051 0 0 3.69 KB
#6491 ObjectExtractorMoreComplexBody net472 3.62μs 3.53ns 12.2ns 0.602 0.00736 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 36.2μs 20ns 74.8ns 0.454 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54.3μs 27.3ns 102ns 0.43 0 0 32.4 KB
master EncodeArgs net472 67.8μs 49.6ns 192ns 5.16 0.0684 0 32.5 KB
master EncodeLegacyArgs net6.0 73.2μs 18.8ns 67.6ns 0.0364 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 105μs 131ns 509ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 157μs 363ns 1.4μs 0.314 0 0 2.15 KB
#6491 EncodeArgs net6.0 36.8μs 17.4ns 62.7ns 0.443 0 0 32.4 KB
#6491 EncodeArgs netcoreapp3.1 53.6μs 20.6ns 71.5ns 0.429 0 0 32.4 KB
#6491 EncodeArgs net472 66.8μs 29ns 108ns 5.16 0.0662 0 32.5 KB
#6491 EncodeLegacyArgs net6.0 72.6μs 34.3ns 128ns 0.0363 0 0 2.14 KB
#6491 EncodeLegacyArgs netcoreapp3.1 108μs 233ns 903ns 0 0 0 2.14 KB
#6491 EncodeLegacyArgs net472 156μs 103ns 401ns 0.309 0 0 2.15 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 RunWafRealisticBenchmark net6.0 174μs 300ns 1.16μs 0 0 0 2.44 KB
master RunWafRealisticBenchmark netcoreapp3.1 187μs 167ns 623ns 0 0 0 2.39 KB
master RunWafRealisticBenchmark net472 201μs 112ns 434ns 0.301 0 0 2.46 KB
master RunWafRealisticBenchmarkWithAttack net6.0 116μs 91.8ns 356ns 0 0 0 1.47 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 123μs 142ns 550ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack net472 133μs 55.3ns 214ns 0.198 0 0 1.49 KB
#6491 RunWafRealisticBenchmark net6.0 176μs 130ns 485ns 0 0 0 2.44 KB
#6491 RunWafRealisticBenchmark netcoreapp3.1 191μs 227ns 878ns 0 0 0 2.39 KB
#6491 RunWafRealisticBenchmark net472 200μs 96.8ns 362ns 0.298 0 0 2.46 KB
#6491 RunWafRealisticBenchmarkWithAttack net6.0 115μs 37.5ns 135ns 0 0 0 1.47 KB
#6491 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 123μs 115ns 446ns 0 0 0 1.46 KB
#6491 RunWafRealisticBenchmarkWithAttack net472 133μs 130ns 487ns 0.199 0 0 1.48 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #6491

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 1.177 54,100.00 63,700.00 bimodal

More allocations ⚠️ in #6491

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 253.96 KB 264.1 KB 10.14 KB 3.99%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 253.5 KB 254.78 KB 1.28 KB 0.50%

Fewer allocations 🎉 in #6491

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 59.04 KB 58.06 KB -984 B -1.67%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 51.8μs 258ns 1.1μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 54.4μs 285ns 1.42μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 38.1μs 85.8ns 309ns 0 0 0 59.04 KB
master StringConcatAspectBenchmark net6.0 303μs 1.48μs 10.9μs 0 0 0 253.96 KB
master StringConcatAspectBenchmark netcoreapp3.1 340μs 1.7μs 10.2μs 0 0 0 253.5 KB
master StringConcatAspectBenchmark net472 279μs 5.34μs 52.3μs 0 0 0 278.53 KB
#6491 StringConcatBenchmark net6.0 60.1μs 731ns 7.23μs 0 0 0 43.44 KB
#6491 StringConcatBenchmark netcoreapp3.1 64.6μs 800ns 7.88μs 0 0 0 42.64 KB
#6491 StringConcatBenchmark net472 38.3μs 207ns 1.11μs 0 0 0 58.06 KB
#6491 StringConcatAspectBenchmark net6.0 307μs 4.09μs 38.4μs 0 0 0 264.1 KB
#6491 StringConcatAspectBenchmark netcoreapp3.1 315μs 5.32μs 52.4μs 0 0 0 254.78 KB
#6491 StringConcatAspectBenchmark net472 283μs 6.46μs 63μs 0 0 0 278.53 KB

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Dec 31, 2024

Datadog Report

Branch report: andrew/ci/minor-sample-warning-fixes
Commit report: b8430b5
Test service: dd-trace-dotnet

✅ 0 Failed, 246172 Passed, 2964 Skipped, 32h 25m 17.2s Total Time

@andrewlock
Copy link
Member Author

Benchmarks Report for tracer 🐌

Benchmarks for #6491 compared to master:

  • All benchmarks have the same speed
  • 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.2μs 46.6ns 339ns 0.0118 0.00393 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10.2μs 45.4ns 176ns 0.0313 0.0157 0.00522 5.8 KB
master StartStopWithChild net472 16.5μs 56.5ns 219ns 1.04 0.302 0.098 6.2 KB
#6491 StartStopWithChild net6.0 7.91μs 43.6ns 258ns 0.0159 0.00796 0 5.61 KB
#6491 StartStopWithChild netcoreapp3.1 10.1μs 52.6ns 298ns 0.0152 0.00508 0 5.8 KB
#6491 StartStopWithChild net472 16.5μs 48.7ns 182ns 1.02 0.289 0.0827 6.2 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 475μs 362ns 1.4μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 636μs 418ns 1.56μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 855μs 533ns 2.06μs 0.425 0 0 3.3 KB
#6491 WriteAndFlushEnrichedTraces net6.0 517μs 419ns 1.45μs 0 0 0 2.7 KB
#6491 WriteAndFlushEnrichedTraces netcoreapp3.1 657μs 305ns 1.14μs 0 0 0 2.7 KB
#6491 WriteAndFlushEnrichedTraces net472 855μs 546ns 2.11μs 0.428 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 162μs 1.47μs 14.4μs 0.164 0 0 14.47 KB
master SendRequest netcoreapp3.1 172μs 1μs 9.77μs 0.159 0 0 17.27 KB
master SendRequest net472 0.00297ns 0.00093ns 0.00348ns 0 0 0 0 b
#6491 SendRequest net6.0 157μs 960ns 9.45μs 0.139 0 0 14.47 KB
#6491 SendRequest netcoreapp3.1 172μs 1.08μs 10.5μs 0.164 0 0 17.27 KB
#6491 SendRequest net472 0.00305ns 0.00128ns 0.00478ns 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 551μs 2.79μs 12.8μs 0.553 0 0 41.66 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 682μs 3.86μs 28.4μs 0.327 0 0 41.83 KB
master WriteAndFlushEnrichedTraces net472 841μs 2.93μs 11.3μs 8.17 2.45 0.408 53.31 KB
#6491 WriteAndFlushEnrichedTraces net6.0 591μs 2.86μs 11.8μs 0.551 0 0 41.78 KB
#6491 WriteAndFlushEnrichedTraces netcoreapp3.1 716μs 4.2μs 40.3μs 0.383 0 0 41.81 KB
#6491 WriteAndFlushEnrichedTraces net472 852μs 4.39μs 20.1μs 8.45 2.53 0.422 53.3 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.33μs 1.34ns 5.2ns 0.014 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.84μs 1.16ns 4.49ns 0.0139 0 0 1.02 KB
master ExecuteNonQuery net472 2.12μs 2.57ns 9.95ns 0.156 0.00106 0 987 B
#6491 ExecuteNonQuery net6.0 1.29μs 1.56ns 6.03ns 0.0142 0 0 1.02 KB
#6491 ExecuteNonQuery netcoreapp3.1 1.82μs 1.61ns 5.81ns 0.0137 0 0 1.02 KB
#6491 ExecuteNonQuery net472 2.01μs 3.64ns 13.1ns 0.157 0.00101 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.17μs 1.67ns 6.26ns 0.0135 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.59μs 0.706ns 2.74ns 0.0128 0 0 976 B
master CallElasticsearch net472 2.54μs 0.707ns 2.55ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.3μs 1.42ns 5.32ns 0.0129 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.63μs 1.98ns 7.41ns 0.014 0 0 1.02 KB
master CallElasticsearchAsync net472 2.54μs 0.793ns 2.97ns 0.166 0 0 1.05 KB
#6491 CallElasticsearch net6.0 1.24μs 1.15ns 4.29ns 0.0136 0 0 976 B
#6491 CallElasticsearch netcoreapp3.1 1.57μs 0.837ns 3.13ns 0.0126 0 0 976 B
#6491 CallElasticsearch net472 2.62μs 1.39ns 5.4ns 0.157 0 0 995 B
#6491 CallElasticsearchAsync net6.0 1.38μs 2.04ns 7.91ns 0.0131 0 0 952 B
#6491 CallElasticsearchAsync netcoreapp3.1 1.66μs 0.777ns 2.91ns 0.014 0 0 1.02 KB
#6491 CallElasticsearchAsync net472 2.51μs 1.18ns 4.42ns 0.166 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.29μs 0.612ns 2.37ns 0.0135 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.66μs 0.905ns 3.5ns 0.0132 0 0 952 B
master ExecuteAsync net472 1.84μs 0.438ns 1.64ns 0.145 0 0 915 B
#6491 ExecuteAsync net6.0 1.29μs 0.66ns 2.47ns 0.0131 0 0 952 B
#6491 ExecuteAsync netcoreapp3.1 1.61μs 0.803ns 3.11ns 0.012 0 0 952 B
#6491 ExecuteAsync net472 1.89μs 0.578ns 2.16ns 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.37μs 1.59ns 5.95ns 0.0327 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.42μs 1.45ns 5.62ns 0.0379 0 0 2.85 KB
master SendAsync net472 7.31μs 1.48ns 5.75ns 0.495 0 0 3.12 KB
#6491 SendAsync net6.0 4.4μs 1.86ns 7.2ns 0.0309 0 0 2.31 KB
#6491 SendAsync netcoreapp3.1 5.41μs 1.89ns 7.08ns 0.0378 0 0 2.85 KB
#6491 SendAsync net472 7.39μs 2.28ns 8.85ns 0.494 0 0 3.12 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 0.833ns 3.12ns 0.0232 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.29μs 1.62ns 6.06ns 0.0218 0 0 1.64 KB
master EnrichedLog net472 2.62μs 1.43ns 5.54ns 0.249 0 0 1.57 KB
#6491 EnrichedLog net6.0 1.63μs 0.957ns 3.58ns 0.0228 0 0 1.64 KB
#6491 EnrichedLog netcoreapp3.1 2.17μs 1.52ns 5.88ns 0.0217 0 0 1.64 KB
#6491 EnrichedLog net472 2.72μs 1.73ns 6.49ns 0.25 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 118μs 271ns 1.05μs 0.0594 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 122μs 156ns 604ns 0 0 0 4.28 KB
master EnrichedLog net472 151μs 211ns 816ns 0.679 0.226 0 4.46 KB
#6491 EnrichedLog net6.0 118μs 280ns 1.09μs 0.0588 0 0 4.28 KB
#6491 EnrichedLog netcoreapp3.1 121μs 144ns 539ns 0 0 0 4.28 KB
#6491 EnrichedLog net472 152μs 144ns 558ns 0.681 0.227 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.95μs 2.48ns 9.27ns 0.0311 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.07μs 3.37ns 13ns 0.0305 0 0 2.2 KB
master EnrichedLog net472 4.91μs 0.977ns 3.79ns 0.32 0 0 2.02 KB
#6491 EnrichedLog net6.0 3μs 0.842ns 3.26ns 0.0299 0 0 2.2 KB
#6491 EnrichedLog netcoreapp3.1 4.19μs 1.43ns 5.34ns 0.0293 0 0 2.2 KB
#6491 EnrichedLog net472 5.03μs 1.73ns 6.71ns 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.4μs 0.819ns 3.06ns 0.0161 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.81μs 1.16ns 4.48ns 0.0155 0 0 1.14 KB
master SendReceive net472 2.09μs 1.97ns 7.61ns 0.183 0 0 1.16 KB
#6491 SendReceive net6.0 1.37μs 0.65ns 2.52ns 0.0158 0 0 1.14 KB
#6491 SendReceive netcoreapp3.1 1.78μs 0.857ns 3.32ns 0.016 0 0 1.14 KB
#6491 SendReceive net472 2.15μs 1.31ns 5.06ns 0.183 0 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.79μs 0.673ns 2.52ns 0.0223 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.92μs 1.39ns 5.02ns 0.0215 0 0 1.65 KB
master EnrichedLog net472 4.38μs 2.32ns 8.69ns 0.323 0 0 2.04 KB
#6491 EnrichedLog net6.0 2.72μs 1.13ns 4.37ns 0.0218 0 0 1.6 KB
#6491 EnrichedLog netcoreapp3.1 4μs 2.64ns 10.2ns 0.022 0 0 1.65 KB
#6491 EnrichedLog net472 4.27μs 3.69ns 14.3ns 0.322 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 404ns 0.252ns 0.942ns 0.00815 0 0 576 B
master StartFinishSpan netcoreapp3.1 543ns 0.273ns 1.06ns 0.00789 0 0 576 B
master StartFinishSpan net472 662ns 0.46ns 1.78ns 0.0917 0 0 578 B
master StartFinishScope net6.0 530ns 2.9ns 15.9ns 0.00978 0 0 696 B
master StartFinishScope netcoreapp3.1 804ns 1.43ns 5.54ns 0.00926 0 0 696 B
master StartFinishScope net472 832ns 0.577ns 2.23ns 0.104 0 0 658 B
#6491 StartFinishSpan net6.0 436ns 0.481ns 1.86ns 0.00809 0 0 576 B
#6491 StartFinishSpan netcoreapp3.1 578ns 1.66ns 6.45ns 0.00794 0 0 576 B
#6491 StartFinishSpan net472 722ns 0.978ns 3.66ns 0.0916 0 0 578 B
#6491 StartFinishScope net6.0 487ns 0.214ns 0.828ns 0.0098 0 0 696 B
#6491 StartFinishScope netcoreapp3.1 783ns 0.654ns 2.53ns 0.0094 0 0 696 B
#6491 StartFinishScope net472 799ns 0.38ns 1.47ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 714ns 0.47ns 1.82ns 0.00953 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 911ns 0.601ns 2.33ns 0.00915 0 0 696 B
master RunOnMethodBegin net472 1.05μs 0.872ns 3.38ns 0.104 0 0 658 B
#6491 RunOnMethodBegin net6.0 681ns 0.377ns 1.46ns 0.00956 0 0 696 B
#6491 RunOnMethodBegin netcoreapp3.1 877ns 0.776ns 3ns 0.00926 0 0 696 B
#6491 RunOnMethodBegin net472 1.13μs 0.92ns 3.56ns 0.104 0 0 658 B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:builds project files, build scripts, pipelines, versioning, releases, packages area:tests unit tests, integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants