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

[Profiler] Add Sample value type provider #4480

Merged
merged 3 commits into from
Aug 28, 2023

Conversation

gleocadie
Copy link
Collaborator

@gleocadie gleocadie commented Aug 2, 2023

Summary of changes

Add Sample Value Type provider .

Reason for change

The goal is to be able to reuse, validate Sample Value Types (for example timeline).

Implementation details

  • Add SampleValueTypeProvider which is in charge of bookkeeping the sample values types defined and used by the profilers.
  • Pass it around.

Test coverage

Add Unit tests

Other details

@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Aug 2, 2023
@gleocadie gleocadie marked this pull request as ready for review August 2, 2023 13:33
@gleocadie gleocadie requested a review from a team as a code owner August 2, 2023 13:33
@andrewlock
Copy link
Member

andrewlock commented Aug 2, 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 (4480) - mean (78ms)  : 57, 98
     .   : milestone, 78,
    master - mean (75ms)  : 55, 96
     .   : milestone, 75,

    section CallTarget+Inlining+NGEN
    This PR (4480) - mean (1,033ms)  : 1006, 1059
     .   : milestone, 1033,
    master - mean (1,041ms)  : 1014, 1067
     .   : milestone, 1041,

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

    section CallTarget+Inlining+NGEN
    This PR (4480) - mean (728ms)  : 704, 752
     .   : milestone, 728,
    master - mean (731ms)  : 704, 758
     .   : milestone, 731,

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

    section CallTarget+Inlining+NGEN
    This PR (4480) - mean (695ms)  : 656, 734
     .   : milestone, 695,
    master - mean (690ms)  : 668, 711
     .   : milestone, 690,

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

    section CallTarget+Inlining+NGEN
    This PR (4480) - mean (1,136ms)  : 1113, 1159
     .   : milestone, 1136,
    master - mean (1,122ms)  : 1097, 1147
     .   : milestone, 1122,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4480) - mean (274ms)  : 267, 280
     .   : milestone, 274,
    master - mean (270ms)  : 261, 279
     .   : milestone, 270,

    section CallTarget+Inlining+NGEN
    This PR (4480) - mean (1,084ms)  : 1045, 1123
     .   : milestone, 1084,
    master - mean (1,093ms)  : 1067, 1120
     .   : milestone, 1093,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4480) - mean (260ms)  : 254, 266
     .   : milestone, 260,
    master - mean (262ms)  : 249, 275
     .   : milestone, 262,

    section CallTarget+Inlining+NGEN
    This PR (4480) - mean (1,048ms)  : 1020, 1077
     .   : milestone, 1048,
    master - mean (1,046ms)  : 1012, 1079
     .   : milestone, 1046,

Loading

@andrewlock
Copy link
Member

andrewlock commented Aug 2, 2023

Benchmarks Report 🐌

Benchmarks for #4480 compared to master:

  • 3 benchmarks are faster, with geometric mean 1.218
  • 1 benchmarks are slower, with geometric mean 1.121
  • 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.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.19μs 41.3ns 180ns 0.0245 0.00818 0 7.29 KB
master StartStopWithChild netcoreapp3.1 10.2μs 55.3ns 293ns 0.0252 0.0101 0 7.4 KB
master StartStopWithChild net472 15.8μs 49.6ns 192ns 1.29 0.349 0.108 7.67 KB
#4480 StartStopWithChild net6.0 8.02μs 33.3ns 125ns 0.028 0.012 0 7.29 KB
#4480 StartStopWithChild netcoreapp3.1 10μs 54.5ns 298ns 0.0339 0.0145 0 7.39 KB
#4480 StartStopWithChild net472 15.5μs 41.2ns 159ns 1.28 0.315 0.108 7.68 KB
Benchmarks.Trace.AgentWriterBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #4480

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 1.138 541,930.28 476,118.82

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 542μs 220ns 850ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 650μs 302ns 1.13μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 816μs 270ns 1.01μs 0.406 0 0 3.3 KB
#4480 WriteAndFlushEnrichedTraces net6.0 476μs 176ns 635ns 0 0 0 2.7 KB
#4480 WriteAndFlushEnrichedTraces netcoreapp3.1 640μs 310ns 1.2μs 0 0 0 2.7 KB
#4480 WriteAndFlushEnrichedTraces net472 800μs 594ns 2.3μs 0.398 0 0 3.3 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #4480

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net6.0 1.236 156.28 126.42

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 39μs 15ns 55.9ns 0.0198 0 0 1.69 KB
master AllCycleSimpleBody netcoreapp3.1 41μs 34.1ns 132ns 0.0204 0 0 1.67 KB
master AllCycleSimpleBody net472 43.5μs 84.2ns 315ns 0.255 0 0 1.73 KB
master AllCycleMoreComplexBody net6.0 231μs 90ns 349ns 0 0 0 9.26 KB
master AllCycleMoreComplexBody netcoreapp3.1 240μs 259ns 1μs 0.119 0 0 9.16 KB
master AllCycleMoreComplexBody net472 249μs 216ns 836ns 1.36 0 0 9.33 KB
master ObjectExtractorSimpleBody net6.0 156ns 0.0535ns 0.2ns 0.00397 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 175ns 0.0697ns 0.261ns 0.00379 0 0 272 B
master ObjectExtractorSimpleBody net472 143ns 0.0778ns 0.301ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.12μs 0.961ns 3.6ns 0.0546 0 0 3.88 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.98μs 2.3ns 8.91ns 0.0517 0 0 3.78 KB
master ObjectExtractorMoreComplexBody net472 4.2μs 4.31ns 16.7ns 0.617 0.0063 0 3.89 KB
#4480 AllCycleSimpleBody net6.0 39.2μs 9.71ns 36.3ns 0.0196 0 0 1.69 KB
#4480 AllCycleSimpleBody netcoreapp3.1 41.3μs 57.8ns 224ns 0.0208 0 0 1.67 KB
#4480 AllCycleSimpleBody net472 43.9μs 35.8ns 138ns 0.26 0 0 1.73 KB
#4480 AllCycleMoreComplexBody net6.0 231μs 95.7ns 358ns 0.115 0 0 9.26 KB
#4480 AllCycleMoreComplexBody netcoreapp3.1 239μs 198ns 864ns 0 0 0 9.16 KB
#4480 AllCycleMoreComplexBody net472 248μs 45ns 174ns 1.48 0 0 9.33 KB
#4480 ObjectExtractorSimpleBody net6.0 126ns 0.0346ns 0.125ns 0.00391 0 0 280 B
#4480 ObjectExtractorSimpleBody netcoreapp3.1 173ns 0.0445ns 0.161ns 0.00376 0 0 272 B
#4480 ObjectExtractorSimpleBody net472 145ns 0.199ns 0.77ns 0.0446 0 0 281 B
#4480 ObjectExtractorMoreComplexBody net6.0 3μs 0.568ns 2.05ns 0.0539 0 0 3.88 KB
#4480 ObjectExtractorMoreComplexBody netcoreapp3.1 4.01μs 1.28ns 4.63ns 0.0501 0 0 3.78 KB
#4480 ObjectExtractorMoreComplexBody net472 4.18μs 4.39ns 17ns 0.618 0.00624 0 3.89 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 122μs 1.03μs 9.54μs 0 0 0 17.62 KB
master RunWaf(args=NestedMap (10)) netcoreapp3.1 130μs 655ns 4.44μs 0 0 0 16.79 KB
master RunWaf(args=NestedMap (10)) net472 130μs 714ns 4.28μs 0 0 0 24.58 KB
master RunWaf(args=NestedMap (100)) net6.0 235μs 1.26μs 11.2μs 0 0 0 37.95 KB
master RunWaf(args=NestedMap (100)) netcoreapp3.1 260μs 1.32μs 8.36μs 0 0 0 37.78 KB
master RunWaf(args=NestedMap (100)) net472 259μs 1.27μs 6.84μs 0 0 0 40.96 KB
master RunWaf(args=NestedMap (1000)) net6.0 233μs 1.2μs 8.58μs 0 0 0 37.95 KB
master RunWaf(args=NestedMap (1000)) netcoreapp3.1 267μs 1.47μs 8.68μs 0 0 0 37.78 KB
master RunWaf(args=NestedMap (1000)) net472 255μs 1.06μs 3.98μs 0 0 0 40.96 KB
#4480 RunWaf(args=NestedMap (10)) net6.0 119μs 769ns 7.17μs 0 0 0 17.62 KB
#4480 RunWaf(args=NestedMap (10)) netcoreapp3.1 137μs 950ns 9.11μs 0 0 0 16.79 KB
#4480 RunWaf(args=NestedMap (10)) net472 126μs 474ns 1.71μs 0 0 0 24.58 KB
#4480 RunWaf(args=NestedMap (100)) net6.0 242μs 1.88μs 18.3μs 0 0 0 37.95 KB
#4480 RunWaf(args=NestedMap (100)) netcoreapp3.1 266μs 1.54μs 13.5μs 0 0 0 37.78 KB
#4480 RunWaf(args=NestedMap (100)) net472 256μs 1.19μs 4.74μs 0 0 0 40.96 KB
#4480 RunWaf(args=NestedMap (1000)) net6.0 231μs 1.2μs 7.5μs 0 0 0 37.95 KB
#4480 RunWaf(args=NestedMap (1000)) netcoreapp3.1 259μs 1.46μs 9.81μs 0 0 0 37.78 KB
#4480 RunWaf(args=NestedMap (1000)) net472 260μs 1.37μs 7.11μs 0 0 0 40.96 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 173μs 115ns 446ns 0.173 0 0 18.09 KB
master SendRequest netcoreapp3.1 190μs 356ns 1.38μs 0.189 0 0 20.25 KB
master SendRequest net472 0.0307ns 0.00775ns 0.03ns 0 0 0 0 b
#4480 SendRequest net6.0 170μs 215ns 831ns 0.255 0 0 18.09 KB
#4480 SendRequest netcoreapp3.1 191μs 461ns 1.79μs 0.189 0 0 20.25 KB
#4480 SendRequest net472 0.000622ns 0.000254ns 0.000984ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #4480

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.58 KB 41.82 KB 243 B 0.58%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 542μs 1.11μs 4.01μs 0.519 0 0 41.58 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 625μs 1.4μs 5.43μs 0.316 0 0 41.79 KB
master WriteAndFlushEnrichedTraces net472 816μs 2.98μs 11.5μs 8.41 2.4 0.401 53.23 KB
#4480 WriteAndFlushEnrichedTraces net6.0 519μs 441ns 1.71μs 0.502 0 0 41.82 KB
#4480 WriteAndFlushEnrichedTraces netcoreapp3.1 625μs 1.45μs 5.6μs 0.309 0 0 41.9 KB
#4480 WriteAndFlushEnrichedTraces net472 778μs 2.72μs 10.6μs 8.2 2.34 0.391 53.23 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.06μs 0.508ns 1.9ns 0.0106 0 0 768 B
master ExecuteNonQuery netcoreapp3.1 1.4μs 2.83ns 10.9ns 0.0105 0 0 768 B
master ExecuteNonQuery net472 1.6μs 0.806ns 3.12ns 0.116 0.000802 0 730 B
#4480 ExecuteNonQuery net6.0 1.02μs 0.566ns 2.12ns 0.0107 0 0 768 B
#4480 ExecuteNonQuery netcoreapp3.1 1.32μs 0.693ns 2.68ns 0.0103 0 0 768 B
#4480 ExecuteNonQuery net472 1.64μs 0.691ns 2.67ns 0.115 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.19μs 0.416ns 1.56ns 0.0137 0 0 992 B
master CallElasticsearch netcoreapp3.1 1.47μs 0.495ns 1.85ns 0.0133 0 0 992 B
master CallElasticsearch net472 2.28μs 0.5ns 1.94ns 0.159 0.00114 0 1 KB
master CallElasticsearchAsync net6.0 1.27μs 0.335ns 1.25ns 0.0133 0 0 968 B
master CallElasticsearchAsync netcoreapp3.1 1.54μs 0.676ns 2.53ns 0.0137 0 0 1.04 KB
master CallElasticsearchAsync net472 2.63μs 0.685ns 2.56ns 0.168 0.00131 0 1.06 KB
#4480 CallElasticsearch net6.0 1.24μs 0.53ns 2.05ns 0.0139 0 0 992 B
#4480 CallElasticsearch netcoreapp3.1 1.45μs 0.77ns 2.88ns 0.0132 0 0 992 B
#4480 CallElasticsearch net472 2.34μs 0.44ns 1.65ns 0.159 0.00117 0 1 KB
#4480 CallElasticsearchAsync net6.0 1.25μs 0.798ns 2.99ns 0.0131 0 0 968 B
#4480 CallElasticsearchAsync netcoreapp3.1 1.55μs 2.8ns 10.5ns 0.0137 0 0 1.04 KB
#4480 CallElasticsearchAsync net472 2.59μs 0.554ns 2.07ns 0.168 0.00129 0 1.06 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.33μs 0.485ns 1.88ns 0.0132 0 0 912 B
master ExecuteAsync netcoreapp3.1 1.41μs 4.75ns 18.4ns 0.0124 0 0 912 B
master ExecuteAsync net472 1.65μs 0.567ns 2.04ns 0.138 0.000829 0 875 B
#4480 ExecuteAsync net6.0 1.29μs 0.478ns 1.85ns 0.0128 0 0 912 B
#4480 ExecuteAsync netcoreapp3.1 1.46μs 0.701ns 2.62ns 0.0118 0 0 912 B
#4480 ExecuteAsync net472 1.72μs 1.39ns 5.22ns 0.139 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.69μs 1.56ns 6.06ns 0.0277 0 0 1.94 KB
master SendAsync netcoreapp3.1 4.44μs 2.06ns 7.71ns 0.0335 0 0 2.48 KB
master SendAsync net472 7.16μs 2.17ns 8.12ns 0.484 0 0 3.05 KB
#4480 SendAsync net6.0 3.93μs 1.44ns 5.18ns 0.0275 0 0 1.94 KB
#4480 SendAsync netcoreapp3.1 4.4μs 1.95ns 7.3ns 0.0331 0 0 2.48 KB
#4480 SendAsync net472 7.18μs 4.33ns 16.8ns 0.483 0 0 3.05 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.29μs 0.499ns 1.93ns 0.0224 0 0 1.62 KB
master EnrichedLog netcoreapp3.1 1.85μs 0.858ns 3.21ns 0.0215 0 0 1.62 KB
master EnrichedLog net472 2.37μs 1.72ns 6.44ns 0.244 0 0 1.54 KB
#4480 EnrichedLog net6.0 1.42μs 1.08ns 4.03ns 0.0227 0 0 1.62 KB
#4480 EnrichedLog netcoreapp3.1 1.84μs 1.16ns 4.48ns 0.0219 0 0 1.62 KB
#4480 EnrichedLog net472 2.26μs 1.07ns 4.16ns 0.245 0 0 1.54 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 111μs 85.9ns 333ns 0.0556 0 0 4.21 KB
master EnrichedLog netcoreapp3.1 118μs 167ns 647ns 0 0 0 4.21 KB
master EnrichedLog net472 146μs 175ns 679ns 0.661 0.22 0 4.38 KB
#4480 EnrichedLog net6.0 113μs 134ns 519ns 0.0571 0 0 4.21 KB
#4480 EnrichedLog netcoreapp3.1 118μs 62.1ns 232ns 0 0 0 4.21 KB
#4480 EnrichedLog net472 147μs 198ns 765ns 0.66 0.22 0 4.38 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.99μs 1.59ns 6.14ns 0.0297 0 0 2.18 KB
master EnrichedLog netcoreapp3.1 3.94μs 1.4ns 5.43ns 0.0276 0 0 2.18 KB
master EnrichedLog net472 4.59μs 1.63ns 6.3ns 0.316 0 0 1.99 KB
#4480 EnrichedLog net6.0 2.75μs 1.12ns 4.2ns 0.0301 0 0 2.18 KB
#4480 EnrichedLog netcoreapp3.1 3.75μs 0.575ns 2.07ns 0.0283 0 0 2.18 KB
#4480 EnrichedLog net472 4.51μs 0.988ns 3.56ns 0.316 0 0 1.99 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.28μs 0.961ns 3.72ns 0.016 0 0 1.16 KB
master SendReceive netcoreapp3.1 1.62μs 2.14ns 8.29ns 0.016 0 0 1.16 KB
master SendReceive net472 2.13μs 1.31ns 4.72ns 0.185 0 0 1.16 KB
#4480 SendReceive net6.0 1.36μs 0.413ns 1.49ns 0.0164 0 0 1.16 KB
#4480 SendReceive netcoreapp3.1 1.74μs 0.616ns 2.3ns 0.0156 0 0 1.16 KB
#4480 SendReceive net472 1.99μs 1.22ns 4.22ns 0.184 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.45μs 0.925ns 3.46ns 0.0209 0 0 1.53 KB
master EnrichedLog netcoreapp3.1 3.64μs 0.853ns 3.19ns 0.0201 0 0 1.58 KB
master EnrichedLog net472 4.12μs 0.894ns 3.22ns 0.309 0 0 1.96 KB
#4480 EnrichedLog net6.0 2.57μs 1.46ns 5.65ns 0.0205 0 0 1.53 KB
#4480 EnrichedLog netcoreapp3.1 3.7μs 1.4ns 5.43ns 0.0201 0 0 1.58 KB
#4480 EnrichedLog net472 4.01μs 1.22ns 4.56ns 0.31 0 0 1.96 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #4480

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 1.121 559.58 627.40

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 483ns 0.215ns 0.803ns 0.00754 0 0 536 B
master StartFinishSpan netcoreapp3.1 559ns 0.18ns 0.625ns 0.00728 0 0 536 B
master StartFinishSpan net472 636ns 0.306ns 1.14ns 0.0852 0 0 538 B
master StartFinishScope net6.0 608ns 0.369ns 1.43ns 0.00909 0 0 656 B
master StartFinishScope netcoreapp3.1 783ns 0.199ns 0.772ns 0.00901 0 0 656 B
master StartFinishScope net472 813ns 0.219ns 0.819ns 0.0981 0 0 618 B
#4480 StartFinishSpan net6.0 472ns 0.181ns 0.701ns 0.00763 0 0 536 B
#4480 StartFinishSpan netcoreapp3.1 627ns 0.134ns 0.482ns 0.00733 0 0 536 B
#4480 StartFinishSpan net472 650ns 0.205ns 0.795ns 0.0853 0 0 538 B
#4480 StartFinishScope net6.0 575ns 0.224ns 0.867ns 0.00902 0 0 656 B
#4480 StartFinishScope netcoreapp3.1 732ns 0.412ns 1.49ns 0.00872 0 0 656 B
#4480 StartFinishScope net472 871ns 1.36ns 5.27ns 0.098 0 0 618 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #4480

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.284 717.27 558.62

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 717ns 0.305ns 1.18ns 0.00905 0 0 656 B
master RunOnMethodBegin netcoreapp3.1 833ns 0.31ns 1.2ns 0.00878 0 0 656 B
master RunOnMethodBegin net472 934ns 0.351ns 1.36ns 0.0981 0 0 618 B
#4480 RunOnMethodBegin net6.0 559ns 0.269ns 1.04ns 0.00934 0 0 656 B
#4480 RunOnMethodBegin netcoreapp3.1 841ns 0.332ns 1.29ns 0.0087 0 0 656 B
#4480 RunOnMethodBegin net472 958ns 0.199ns 0.769ns 0.0978 0 0 618 B

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Aug 2, 2023

Datadog Report

Branch report: gleocadie/add-managed-thread-lifecycle-events
Commit report: 1685c53

dd-trace-dotnet: 0 Failed, 0 New Flaky, 296067 Passed, 1091 Skipped, 26m 35.83s Wall Time

@andrewlock
Copy link
Member

andrewlock commented Aug 2, 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 (4480) (11.141M)   : 0, 11141007
    master (10.950M)   : 0, 10949537
    benchmarks/2.35.0 (11.168M)   : 0, 11167804
    benchmarks/2.9.0 (11.331M)   : 0, 11330912

    section Automatic
    This PR (4480) (7.952M)   : 0, 7951852
    master (7.724M)   : 0, 7723657
    benchmarks/2.35.0 (7.830M)   : 0, 7830034
    benchmarks/2.9.0 (8.209M)   : 0, 8208571

    section Trace stats
    master (7.737M)   : 0, 7736649
    benchmarks/2.35.0 (7.917M)   : 0, 7916558

    section Manual
    This PR (4480) (10.102M)   : 0, 10102133
    master (9.844M)   : 0, 9843544
    benchmarks/2.35.0 (10.109M)   : 0, 10108664

    section Manual + Automatic
    This PR (4480) (7.560M)   : 0, 7559676
    master (7.433M)   : 0, 7433455
    benchmarks/2.35.0 (7.699M)   : 0, 7699482

    section Version Conflict
    master (6.675M)   : 0, 6675101
    benchmarks/2.35.0 (6.705M)   : 0, 6704596

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4480) (9.755M)   : 0, 9754898
    master (9.410M)   : 0, 9410360
    benchmarks/2.35.0 (9.271M)   : 0, 9271267
    benchmarks/2.9.0 (9.644M)   : 0, 9644200

    section Automatic
    This PR (4480) (6.738M)   : 0, 6738484
    master (6.707M)   : 0, 6706789
    benchmarks/2.35.0 (6.935M)   : 0, 6934961

    section Trace stats
    master (6.813M)   : 0, 6812569
    benchmarks/2.35.0 (6.655M)   : 0, 6654524

    section Manual
    This PR (4480) (8.614M)   : 0, 8613943
    master (8.338M)   : 0, 8337926
    benchmarks/2.35.0 (8.443M)   : 0, 8442584

    section Manual + Automatic
    This PR (4480) (6.631M)   : 0, 6630872
    master (6.550M)   : 0, 6550025
    benchmarks/2.35.0 (6.179M)   : 0, 6178579

    section Version Conflict
    master (5.930M)   : 0, 5930282
    benchmarks/2.35.0 (5.889M)   : 0, 5888717

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4480) (10.199M)   : 0, 10199462
    master (10.297M)   : 0, 10296662
    benchmarks/2.35.0 (10.146M)   : 0, 10146425
    benchmarks/2.9.0 (10.284M)   : 0, 10283932

    section Automatic
    This PR (4480) (7.366M)   : 0, 7366357
    master (7.509M)   : 0, 7508832
    benchmarks/2.35.0 (7.467M)   : 0, 7466551
    benchmarks/2.9.0 (7.465M)   : 0, 7465250

    section Trace stats
    master (7.429M)   : 0, 7428941
    benchmarks/2.35.0 (7.465M)   : 0, 7465121

    section Manual
    This PR (4480) (9.345M)   : 0, 9344611
    master (9.272M)   : 0, 9271838
    benchmarks/2.35.0 (9.294M)   : 0, 9294493

    section Manual + Automatic
    This PR (4480) (7.269M)   : 0, 7268864
    master (7.277M)   : 0, 7277321
    benchmarks/2.35.0 (7.235M)   : 0, 7235469

    section Version Conflict
    master (6.689M)   : 0, 6689212
    benchmarks/2.35.0 (6.720M)   : 0, 6720005

Loading
gantt
    title Throughput Linux x64 (ASM) (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4480) (7.661M)   : 0, 7661109
    master (7.634M)   : 0, 7634092
    benchmarks/2.35.0 (7.654M)   : 0, 7654266
    benchmarks/2.9.0 (8.035M)   : 0, 8035221

    section No attack
    This PR (4480) (2.219M)   : 0, 2219372
    master (2.215M)   : 0, 2215102
    benchmarks/2.35.0 (2.190M)   : 0, 2190492
    benchmarks/2.9.0 (3.290M)   : 0, 3290232

    section Attack
    This PR (4480) (1.904M)   : 0, 1904168
    master (1.880M)   : 0, 1880404
    benchmarks/2.35.0 (1.916M)   : 0, 1916309
    benchmarks/2.9.0 (2.548M)   : 0, 2548221

    section Blocking
    This PR (4480) (3.827M)   : 0, 3826715
    master (3.843M)   : 0, 3843044
    benchmarks/2.35.0 (3.894M)   : 0, 3894358

Loading

@gleocadie gleocadie force-pushed the gleocadie/add-managed-thread-lifecycle-events branch 2 times, most recently from 7236b54 to 1685c53 Compare August 3, 2023 07:39
Copy link
Contributor

@chrisnas chrisnas left a comment

Choose a reason for hiding this comment

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

LGTM (with a rename)

_sampleTypeDefinitions.reserve(16);
}

std::vector<SampleValueTypeProvider::Offset> SampleValueTypeProvider::Register(std::vector<SampleValueType> const& valueTypes)
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename to GetOrRegister to avoid confusion (at least in my mind ;^)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@gleocadie gleocadie force-pushed the gleocadie/add-managed-thread-lifecycle-events branch from 1685c53 to c6d0358 Compare August 28, 2023 12:12
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Aug 28, 2023

Datadog Report

Branch report: gleocadie/add-managed-thread-lifecycle-events
Commit report: 319fa9e

dd-trace-dotnet: 0 Failed, 0 New Flaky, 299652 Passed, 1115 Skipped, 22m 59.65s Wall Time

@gleocadie gleocadie merged commit b1727e6 into master Aug 28, 2023
@gleocadie gleocadie deleted the gleocadie/add-managed-thread-lifecycle-events branch August 28, 2023 16:04
@github-actions github-actions bot added this to the vNext milestone Aug 28, 2023
NachoEchevarria pushed a commit that referenced this pull request Aug 29, 2023
* Add Sample value type provider
* Address comment
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