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

[Profiling] Reduce available symbols #5195

Merged
merged 4 commits into from
Feb 20, 2024
Merged

Conversation

r1viollet
Copy link
Contributor

Summary of changes

Add a linker script to define what symbols should be published

Reason for change

Avoid exposing rust internal symbols as it can cause issues, as mentioned here:
rust-lang/rust#100774

Implementation details

Adding a linker script

Test coverage

Other details

@r1viollet r1viollet requested a review from a team as a code owner February 15, 2024 09:26
@r1viollet r1viollet marked this pull request as draft February 15, 2024 09:26
@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Feb 15, 2024
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Feb 15, 2024

Datadog Report

Branch report: r1viollet/linker_script
Commit report: 7d45ee5
Test service: dd-trace-dotnet

✅ 0 Failed, 308773 Passed, 1837 Skipped, 53m 12.91s Wall Time
❄️ 1 New Flaky
⌛ 16 Performance Regressions

New Flaky Tests (1)

  • TelemetryControllerDumpsAllTelemetryToFile - Datadog.Trace.Tests.Telemetry.TelemetryControllerTests

⌛ Performance Regressions vs Default Branch (16)

This report shows up to 5 performance regressions.

  • SendRequest - Benchmarks.Trace.AspNetCoreBenchmark 0s (+0s, +25939%)
  • ExecuteAsync - Benchmarks.Trace.GraphQLBenchmark 1.9µs (+584ns, +44%)
  • AllCycleSimpleBody - Benchmarks.Trace.Asm.AppSecBodyBenchmark 44.01µs (+3.03µs, +7%)
  • ObjectExtractorMoreComplexBody - Benchmarks.Trace.Asm.AppSecBodyBenchmark 4.98µs (+1.94µs, +64%)
  • AllCycleSimpleBody - Benchmarks.Trace.Asm.AppSecBodyBenchmark 50.41µs (+6.33µs, +14%)

@andrewlock
Copy link
Member

andrewlock commented Feb 15, 2024

Execution-Time Benchmarks Report ⏱️

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

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

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

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

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

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5195) - mean (77ms)  : 64, 89
     .   : milestone, 77,
    master - mean (72ms)  : 64, 80
     .   : milestone, 72,

    section CallTarget+Inlining+NGEN
    This PR (5195) - mean (990ms)  : 971, 1009
     .   : milestone, 990,
    master - mean (989ms)  : 963, 1015
     .   : milestone, 989,

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

    section CallTarget+Inlining+NGEN
    This PR (5195) - mean (723ms)  : 700, 745
     .   : milestone, 723,
    master - mean (716ms)  : 696, 735
     .   : milestone, 716,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5195) - mean (95ms)  : 90, 99
     .   : milestone, 95,
    master - mean (94ms)  : 91, 97
     .   : milestone, 94,

    section CallTarget+Inlining+NGEN
    This PR (5195) - mean (678ms)  : 657, 699
     .   : milestone, 678,
    master - mean (670ms)  : 650, 690
     .   : milestone, 670,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5195) - mean (188ms)  : 183, 193
     .   : milestone, 188,
    master - mean (187ms)  : 183, 190
     .   : milestone, 187,

    section CallTarget+Inlining+NGEN
    This PR (5195) - mean (1,060ms)  : 1033, 1086
     .   : milestone, 1060,
    master - mean (1,054ms)  : 1033, 1075
     .   : milestone, 1054,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5195) - mean (270ms)  : 262, 277
     .   : milestone, 270,
    master - mean (269ms)  : 261, 276
     .   : milestone, 269,

    section CallTarget+Inlining+NGEN
    This PR (5195) - mean (1,056ms)  : 1031, 1080
     .   : milestone, 1056,
    master - mean (1,054ms)  : 1028, 1080
     .   : milestone, 1054,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5195) - mean (260ms)  : 255, 265
     .   : milestone, 260,
    master - mean (259ms)  : 254, 264
     .   : milestone, 259,

    section CallTarget+Inlining+NGEN
    This PR (5195) - mean (999ms)  : 975, 1023
     .   : milestone, 999,
    master - mean (1,001ms)  : 984, 1018
     .   : milestone, 1001,

Loading

@andrewlock
Copy link
Member

Benchmarks Report 🐌

Benchmarks for #5195 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.166
  • 2 benchmarks are slower, with geometric mean 1.120
  • 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.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.92μs 48.6ns 283ns 0.0258 0.00859 0 7.5 KB
master StartStopWithChild netcoreapp3.1 10.9μs 59.9ns 359ns 0.0351 0.015 0 7.59 KB
master StartStopWithChild net472 17.3μs 55.2ns 207ns 1.32 0.327 0.103 7.96 KB
#5195 StartStopWithChild net6.0 8.75μs 49.4ns 324ns 0.0169 0.00847 0 7.49 KB
#5195 StartStopWithChild netcoreapp3.1 10.6μs 53.9ns 235ns 0.0363 0.0155 0 7.58 KB
#5195 StartStopWithChild net472 16.9μs 75.4ns 292ns 1.32 0.315 0.0851 7.98 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 450μs 158ns 611ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 629μs 256ns 993ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 787μs 220ns 853ns 0.393 0 0 3.3 KB
#5195 WriteAndFlushEnrichedTraces net6.0 442μs 144ns 518ns 0 0 0 2.7 KB
#5195 WriteAndFlushEnrichedTraces netcoreapp3.1 598μs 226ns 876ns 0 0 0 2.7 KB
#5195 WriteAndFlushEnrichedTraces net472 793μs 279ns 1.08μs 0.398 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 41.3μs 17.9ns 69.2ns 0.0204 0 0 2.36 KB
master AllCycleSimpleBody netcoreapp3.1 43.8μs 43.5ns 157ns 0.0218 0 0 2.34 KB
master AllCycleSimpleBody net472 46.5μs 8.49ns 30.6ns 0.37 0 0 2.41 KB
master AllCycleMoreComplexBody net6.0 215μs 94.6ns 354ns 0.107 0 0 9.84 KB
master AllCycleMoreComplexBody netcoreapp3.1 227μs 208ns 807ns 0.113 0 0 9.73 KB
master AllCycleMoreComplexBody net472 238μs 63.5ns 246ns 1.55 0 0 9.91 KB
master ObjectExtractorSimpleBody net6.0 142ns 0.0833ns 0.323ns 0.00395 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 209ns 0.271ns 0.939ns 0.00375 0 0 272 B
master ObjectExtractorSimpleBody net472 163ns 0.0875ns 0.339ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.06μs 0.918ns 3.31ns 0.0535 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.98μs 1.09ns 3.95ns 0.0499 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.71μs 2.01ns 7.78ns 0.603 0.00558 0 3.8 KB
#5195 AllCycleSimpleBody net6.0 40.9μs 13ns 50.4ns 0.0206 0 0 2.36 KB
#5195 AllCycleSimpleBody netcoreapp3.1 44.2μs 71.5ns 277ns 0.022 0 0 2.34 KB
#5195 AllCycleSimpleBody net472 47.4μs 15.3ns 57.3ns 0.38 0 0 2.41 KB
#5195 AllCycleMoreComplexBody net6.0 216μs 78.7ns 305ns 0.108 0 0 9.84 KB
#5195 AllCycleMoreComplexBody netcoreapp3.1 226μs 88.4ns 306ns 0.113 0 0 9.73 KB
#5195 AllCycleMoreComplexBody net472 241μs 51.5ns 193ns 1.57 0 0 9.91 KB
#5195 ObjectExtractorSimpleBody net6.0 139ns 0.0686ns 0.238ns 0.00392 0 0 280 B
#5195 ObjectExtractorSimpleBody netcoreapp3.1 202ns 0.112ns 0.406ns 0.00367 0 0 272 B
#5195 ObjectExtractorSimpleBody net472 171ns 0.209ns 0.808ns 0.0446 0 0 281 B
#5195 ObjectExtractorMoreComplexBody net6.0 3μs 1.54ns 5.75ns 0.0525 0 0 3.78 KB
#5195 ObjectExtractorMoreComplexBody netcoreapp3.1 3.91μs 1.51ns 5.84ns 0.0508 0 0 3.69 KB
#5195 ObjectExtractorMoreComplexBody net472 3.77μs 2.84ns 10.6ns 0.602 0.00564 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 55.4μs 59.8ns 216ns 0.418 0 0 30.94 KB
master EncodeArgs netcoreapp3.1 69.3μs 64.9ns 243ns 0.416 0 0 31.47 KB
master EncodeArgs net472 83.9μs 67.6ns 262ns 5.11 0.0838 0 32.27 KB
master EncodeLegacyArgs net6.0 127μs 194ns 752ns 0.439 0 0 33.89 KB
master EncodeLegacyArgs netcoreapp3.1 159μs 331ns 1.28μs 0.463 0 0 34.09 KB
master EncodeLegacyArgs net472 208μs 104ns 362ns 5.53 0.417 0 35 KB
#5195 EncodeArgs net6.0 52.7μs 58.9ns 228ns 0.419 0 0 30.94 KB
#5195 EncodeArgs netcoreapp3.1 69.3μs 55.8ns 216ns 0.415 0 0 31.47 KB
#5195 EncodeArgs net472 85.7μs 35.4ns 123ns 5.12 0.086 0 32.27 KB
#5195 EncodeLegacyArgs net6.0 122μs 327ns 1.27μs 0.422 0 0 33.89 KB
#5195 EncodeLegacyArgs netcoreapp3.1 159μs 751ns 3μs 0.462 0 0 34.09 KB
#5195 EncodeLegacyArgs net472 210μs 167ns 626ns 5.54 0.418 0 34.99 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 192μs 90.9ns 340ns 0 0 0 6.51 KB
master RunWafRealisticBenchmark netcoreapp3.1 203μs 177ns 663ns 0 0 0 6.49 KB
master RunWafRealisticBenchmark net472 223μs 138ns 535ns 1 0 0 6.59 KB
master RunWafRealisticBenchmarkWithAttack net6.0 126μs 545ns 2.11μs 0.0638 0 0 4.15 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 134μs 256ns 993ns 0 0 0 4.14 KB
master RunWafRealisticBenchmarkWithAttack net472 146μs 40.4ns 151ns 0.658 0 0 4.19 KB
#5195 RunWafRealisticBenchmark net6.0 190μs 110ns 396ns 0 0 0 6.51 KB
#5195 RunWafRealisticBenchmark netcoreapp3.1 204μs 343ns 1.33μs 0 0 0 6.49 KB
#5195 RunWafRealisticBenchmark net472 224μs 107ns 414ns 1.01 0 0 6.59 KB
#5195 RunWafRealisticBenchmarkWithAttack net6.0 125μs 47.7ns 185ns 0 0 0 4.15 KB
#5195 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 132μs 106ns 410ns 0 0 0 4.14 KB
#5195 RunWafRealisticBenchmarkWithAttack net472 145μs 74.2ns 287ns 0.652 0 0 4.19 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 117ns 439ns 0.257 0 0 18.26 KB
master SendRequest netcoreapp3.1 194μs 208ns 804ns 0.193 0 0 20.42 KB
master SendRequest net472 0.000192ns 0.000118ns 0.000456ns 0 0 0 0 b
#5195 SendRequest net6.0 170μs 200ns 776ns 0.17 0 0 18.26 KB
#5195 SendRequest netcoreapp3.1 191μs 437ns 1.69μs 0.19 0 0 20.42 KB
#5195 SendRequest net472 0.000873ns 0.000176ns 0.000657ns 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 544μs 1.44μs 5.58μs 0.534 0 0 41.55 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 658μs 1.2μs 4.66μs 0.324 0 0 41.83 KB
master WriteAndFlushEnrichedTraces net472 843μs 2.71μs 10.5μs 8.28 2.48 0.414 53.24 KB
#5195 WriteAndFlushEnrichedTraces net6.0 534μs 260ns 938ns 0.543 0 0 41.58 KB
#5195 WriteAndFlushEnrichedTraces netcoreapp3.1 650μs 1.84μs 7.12μs 0.326 0 0 41.69 KB
#5195 WriteAndFlushEnrichedTraces net472 894μs 4.31μs 18.3μs 8.19 2.59 0.431 53.24 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.12μs 0.408ns 1.53ns 0.0107 0 0 776 B
master ExecuteNonQuery netcoreapp3.1 1.51μs 0.94ns 3.64ns 0.0105 0 0 776 B
master ExecuteNonQuery net472 1.85μs 1.27ns 4.9ns 0.117 0 0 738 B
#5195 ExecuteNonQuery net6.0 1.13μs 0.554ns 2.15ns 0.0109 0 0 776 B
#5195 ExecuteNonQuery netcoreapp3.1 1.48μs 1.27ns 4.76ns 0.0104 0 0 776 B
#5195 ExecuteNonQuery net472 1.73μs 0.723ns 2.8ns 0.117 0 0 738 B
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5195

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 1.122 1,204.43 1,351.83

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.2μs 0.534ns 2.07ns 0.0133 0 0 944 B
master CallElasticsearch netcoreapp3.1 1.59μs 1.88ns 7.3ns 0.0128 0 0 944 B
master CallElasticsearch net472 2.5μs 1.13ns 4.38ns 0.152 0 0 963 B
master CallElasticsearchAsync net6.0 1.29μs 0.651ns 2.52ns 0.0129 0 0 920 B
master CallElasticsearchAsync netcoreapp3.1 1.59μs 0.738ns 2.76ns 0.0134 0 0 992 B
master CallElasticsearchAsync net472 2.64μs 3.73ns 14.5ns 0.161 0 0 1.02 KB
#5195 CallElasticsearch net6.0 1.35μs 0.753ns 2.92ns 0.0129 0 0 944 B
#5195 CallElasticsearch netcoreapp3.1 1.54μs 0.661ns 2.38ns 0.013 0 0 944 B
#5195 CallElasticsearch net472 2.35μs 0.766ns 2.97ns 0.152 0 0 963 B
#5195 CallElasticsearchAsync net6.0 1.26μs 0.82ns 3.17ns 0.013 0 0 920 B
#5195 CallElasticsearchAsync netcoreapp3.1 1.55μs 0.509ns 1.9ns 0.0131 0 0 992 B
#5195 CallElasticsearchAsync net472 2.62μs 0.569ns 2.05ns 0.162 0 0 1.02 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.3μs 0.64ns 2.39ns 0.0131 0 0 920 B
master ExecuteAsync netcoreapp3.1 1.63μs 0.908ns 3.4ns 0.0122 0 0 920 B
master ExecuteAsync net472 1.79μs 1ns 3.87ns 0.14 0 0 883 B
#5195 ExecuteAsync net6.0 1.41μs 0.554ns 2.14ns 0.0127 0 0 920 B
#5195 ExecuteAsync netcoreapp3.1 1.63μs 0.675ns 2.62ns 0.0122 0 0 920 B
#5195 ExecuteAsync net472 1.9μs 0.637ns 2.38ns 0.139 0 0 883 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.16μs 0.931ns 3.36ns 0.0292 0 0 2.1 KB
master SendAsync netcoreapp3.1 4.96μs 2.65ns 9.9ns 0.0347 0 0 2.64 KB
master SendAsync net472 7.77μs 3.72ns 13.9ns 0.525 0 0 3.31 KB
#5195 SendAsync net6.0 4.16μs 1.66ns 6.43ns 0.0291 0 0 2.1 KB
#5195 SendAsync netcoreapp3.1 5μs 2.07ns 8ns 0.035 0 0 2.64 KB
#5195 SendAsync net472 7.76μs 4.12ns 16ns 0.524 0 0 3.31 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #5195

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 204.22 KB 215.08 KB 10.86 KB 5.32%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 203.8 KB 213.36 KB 9.56 KB 4.69%

Fewer allocations 🎉 in #5195

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 60.75 KB 59.22 KB -1.53 KB -2.52%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 51.7μs 255ns 1.05μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 52.8μs 256ns 1.06μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 37.1μs 133ns 479ns 0 0 0 60.75 KB
master StringConcatAspectBenchmark net6.0 266μs 1.15μs 6.18μs 0 0 0 204.22 KB
master StringConcatAspectBenchmark netcoreapp3.1 306μs 1.66μs 9.37μs 0 0 0 203.8 KB
master StringConcatAspectBenchmark net472 234μs 3.37μs 32.2μs 0 0 0 221.18 KB
#5195 StringConcatBenchmark net6.0 51.9μs 211ns 761ns 0 0 0 43.44 KB
#5195 StringConcatBenchmark netcoreapp3.1 53μs 166ns 574ns 0 0 0 42.64 KB
#5195 StringConcatBenchmark net472 38.1μs 154ns 575ns 0 0 0 59.22 KB
#5195 StringConcatAspectBenchmark net6.0 283μs 1.49μs 8.79μs 0 0 0 215.08 KB
#5195 StringConcatAspectBenchmark netcoreapp3.1 289μs 1.55μs 9.82μs 0 0 0 213.36 KB
#5195 StringConcatAspectBenchmark net472 243μs 2.91μs 27.4μs 0 0 0 221.18 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.748ns 2.9ns 0.0219 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 2.22μs 0.888ns 3.2ns 0.0213 0 0 1.58 KB
master EnrichedLog net472 2.7μs 7.69ns 29.8ns 0.239 0 0 1.51 KB
#5195 EnrichedLog net6.0 1.51μs 0.856ns 3.2ns 0.0221 0 0 1.58 KB
#5195 EnrichedLog netcoreapp3.1 2.21μs 1.27ns 4.76ns 0.0211 0 0 1.58 KB
#5195 EnrichedLog net472 2.61μs 0.59ns 2.04ns 0.239 0 0 1.51 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 194ns 753ns 0.0562 0 0 4.22 KB
master EnrichedLog netcoreapp3.1 118μs 104ns 388ns 0 0 0 4.22 KB
master EnrichedLog net472 149μs 127ns 477ns 0.67 0.223 0 4.4 KB
#5195 EnrichedLog net6.0 115μs 158ns 611ns 0 0 0 4.22 KB
#5195 EnrichedLog netcoreapp3.1 119μs 137ns 530ns 0.0588 0 0 4.22 KB
#5195 EnrichedLog net472 147μs 98.6ns 355ns 0.66 0.22 0 4.4 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.91μs 0.868ns 3.36ns 0.0292 0 0 2.14 KB
master EnrichedLog netcoreapp3.1 4.15μs 1.27ns 4.59ns 0.0289 0 0 2.14 KB
master EnrichedLog net472 4.86μs 1.91ns 7.41ns 0.309 0 0 1.95 KB
#5195 EnrichedLog net6.0 2.99μs 0.936ns 3.5ns 0.0301 0 0 2.14 KB
#5195 EnrichedLog netcoreapp3.1 4.25μs 1.62ns 6.28ns 0.0278 0 0 2.14 KB
#5195 EnrichedLog net472 4.76μs 1.41ns 5.28ns 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.38μs 0.851ns 3.29ns 0.0159 0 0 1.11 KB
master SendReceive netcoreapp3.1 1.73μs 0.931ns 3.36ns 0.0155 0 0 1.11 KB
master SendReceive net472 2.2μs 2.98ns 11.5ns 0.178 0 0 1.12 KB
#5195 SendReceive net6.0 1.37μs 0.43ns 1.66ns 0.0158 0 0 1.11 KB
#5195 SendReceive netcoreapp3.1 1.76μs 1.22ns 4.71ns 0.0149 0 0 1.11 KB
#5195 SendReceive net472 2.06μs 2.82ns 10.6ns 0.178 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.66μs 1.01ns 3.78ns 0.0214 0 0 1.54 KB
master EnrichedLog netcoreapp3.1 3.97μs 1.8ns 6.97ns 0.0219 0 0 1.58 KB
master EnrichedLog net472 4.33μs 1.3ns 4.86ns 0.312 0 0 1.97 KB
#5195 EnrichedLog net6.0 2.7μs 5.04ns 19.5ns 0.0215 0 0 1.54 KB
#5195 EnrichedLog netcoreapp3.1 3.81μs 2.28ns 8.85ns 0.021 0 0 1.58 KB
#5195 EnrichedLog net472 4.52μs 2.9ns 11.2ns 0.313 0 0 1.97 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5195

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.118 550.20 615.22

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 482ns 0.194ns 0.75ns 0.00749 0 0 544 B
master StartFinishSpan netcoreapp3.1 678ns 0.296ns 1.11ns 0.00757 0 0 544 B
master StartFinishSpan net472 758ns 0.453ns 1.76ns 0.0863 0.000377 0 546 B
master StartFinishScope net6.0 550ns 0.258ns 0.998ns 0.00938 0 0 664 B
master StartFinishScope netcoreapp3.1 860ns 0.213ns 0.767ns 0.00861 0 0 664 B
master StartFinishScope net472 967ns 0.7ns 2.71ns 0.0991 0 0 626 B
#5195 StartFinishSpan net6.0 473ns 0.116ns 0.451ns 0.00768 0 0 544 B
#5195 StartFinishSpan netcoreapp3.1 734ns 0.587ns 2.27ns 0.00736 0 0 544 B
#5195 StartFinishSpan net472 783ns 0.376ns 1.46ns 0.0866 0 0 546 B
#5195 StartFinishScope net6.0 615ns 0.151ns 0.565ns 0.00922 0 0 664 B
#5195 StartFinishScope netcoreapp3.1 863ns 0.397ns 1.54ns 0.00863 0 0 664 B
#5195 StartFinishScope net472 918ns 0.799ns 3.09ns 0.0994 0 0 626 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5195

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.166 767.77 658.22

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 768ns 0.599ns 2.32ns 0.00908 0 0 664 B
master RunOnMethodBegin netcoreapp3.1 863ns 0.454ns 1.7ns 0.00901 0 0 664 B
master RunOnMethodBegin net472 1.06μs 0.396ns 1.53ns 0.0993 0 0 626 B
#5195 RunOnMethodBegin net6.0 658ns 0.185ns 0.666ns 0.0093 0 0 664 B
#5195 RunOnMethodBegin netcoreapp3.1 916ns 0.379ns 1.47ns 0.00903 0 0 664 B
#5195 RunOnMethodBegin net472 1.08μs 0.312ns 1.17ns 0.099 0 0 626 B

@r1viollet r1viollet marked this pull request as ready for review February 15, 2024 11:05
r1viollet and others added 2 commits February 15, 2024 13:35
Add a linker script to define what symbols should be published
Copy link
Collaborator

@gleocadie gleocadie left a comment

Choose a reason for hiding this comment

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

LGTM
I downloaded the symbols and check that only the ones needed are public/visible

@r1viollet r1viollet changed the title Profiling - Reduce available symbols [Profiling] Reduce available symbols Feb 16, 2024
@andrewlock
Copy link
Member

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 (5195) (11.124M)   : 0, 11124481
    master (11.223M)   : 0, 11223343
    benchmarks/2.9.0 (11.163M)   : 0, 11162756

    section Automatic
    This PR (5195) (7.561M)   : 0, 7560906
    master (7.777M)   : 0, 7776526
    benchmarks/2.9.0 (8.268M)   : 0, 8267853

    section Trace stats
    This PR (5195) (7.957M)   : 0, 7957368
    master (8.078M)   : 0, 8077726

    section Manual
    This PR (5195) (9.599M)   : 0, 9598952
    master (9.889M)   : 0, 9888940

    section Manual + Automatic
    This PR (5195) (7.233M)   : 0, 7232811
    master (7.321M)   : 0, 7320701

    section Version Conflict
    This PR (5195) (6.398M)   : 0, 6397681
    master (6.588M)   : 0, 6588359

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5195) (9.425M)   : 0, 9424780
    master (9.460M)   : 0, 9460218
    benchmarks/2.9.0 (9.367M)   : 0, 9367466

    section Automatic
    This PR (5195) (6.588M)   : 0, 6588037
    master (6.488M)   : 0, 6487564

    section Trace stats
    This PR (5195) (6.907M)   : 0, 6906584
    master (6.834M)   : 0, 6834048

    section Manual
    This PR (5195) (8.236M)   : 0, 8236306
    master (8.249M)   : 0, 8249249

    section Manual + Automatic
    This PR (5195) (6.204M)   : 0, 6204275
    master (5.992M)   : 0, 5991797

    section Version Conflict
    This PR (5195) (5.627M)   : 0, 5626736
    master (5.872M)   : 0, 5871504

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5195) (10.125M)   : 0, 10124747
    master (10.256M)   : 0, 10255541
    benchmarks/2.9.0 (10.212M)   : 0, 10211874

    section Automatic
    This PR (5195) (7.216M)   : 0, 7216131
    master (7.266M)   : 0, 7266279
    benchmarks/2.9.0 (7.605M)   : 0, 7605074

    section Trace stats
    This PR (5195) (7.479M)   : 0, 7479271
    master (7.489M)   : 0, 7488740

    section Manual
    This PR (5195) (9.112M)   : 0, 9111942
    master (8.797M)   : 0, 8797181

    section Manual + Automatic
    This PR (5195) (6.964M)   : 0, 6964387
    master (6.886M)   : 0, 6886353

    section Version Conflict
    This PR (5195) (6.272M)   : 0, 6271555
    master (6.255M)   : 0, 6255134

Loading
gantt
    title Throughput Linux x64 (ASM) (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    master (7.526M)   : 0, 7525997
    benchmarks/2.9.0 (7.838M)   : 0, 7838185

    section No attack
    master (1.837M)   : 0, 1836995
    benchmarks/2.9.0 (3.252M)   : 0, 3252197

    section Attack
    master (1.447M)   : 0, 1446596
    benchmarks/2.9.0 (2.508M)   : 0, 2508032

    section Blocking
    master (3.154M)   : 0, 3153550

    section IAST default
    master (6.403M)   : 0, 6402880

    section IAST full
    master (5.677M)   : 0, 5676700

    section Base vuln
    master (0.931M)   : 0, 930765

    section IAST vuln
    master (0.875M)   : 0, 875472

Loading

@gleocadie gleocadie merged commit c46daa3 into master Feb 20, 2024
60 of 63 checks passed
@gleocadie gleocadie deleted the r1viollet/linker_script branch February 20, 2024 10:20
@github-actions github-actions bot added this to the vNext milestone Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:profiler Issues related to the continous-profiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants