-
Notifications
You must be signed in to change notification settings - Fork 143
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
base: master
Are you sure you want to change the base?
Conversation
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:
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,
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,
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,
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,
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,
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,
|
Benchmarks Report for appsec 🐌Benchmarks for #6491 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower
|
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 |
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% |
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 ReportBranch report: ✅ 0 Failed, 246172 Passed, 2964 Skipped, 32h 25m 17.2s Total Time |
Benchmarks Report for tracer 🐌Benchmarks for #6491 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️Raw results
|
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