-
Notifications
You must be signed in to change notification settings - Fork 140
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
Make compare_throughput
stage more robust
#4739
Conversation
Datadog ReportBranch report: ✅ |
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 (4739) - mean (71ms) : 63, 78
. : milestone, 71,
master - mean (69ms) : 63, 76
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (4739) - mean (1,023ms) : 1002, 1044
. : milestone, 1023,
master - mean (1,013ms) : 994, 1032
. : milestone, 1013,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4739) - mean (107ms) : 102, 111
. : milestone, 107,
master - mean (107ms) : 96, 118
. : milestone, 107,
section CallTarget+Inlining+NGEN
This PR (4739) - mean (718ms) : 698, 738
. : milestone, 718,
master - mean (716ms) : 695, 737
. : milestone, 716,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4739) - mean (91ms) : 87, 94
. : milestone, 91,
master - mean (90ms) : 84, 96
. : milestone, 90,
section CallTarget+Inlining+NGEN
This PR (4739) - mean (684ms) : 668, 701
. : milestone, 684,
master - mean (682ms) : 653, 711
. : milestone, 682,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4739) - mean (188ms) : 184, 193
. : milestone, 188,
master - mean (188ms) : 185, 192
. : milestone, 188,
section CallTarget+Inlining+NGEN
This PR (4739) - mean (1,126ms) : 1097, 1155
. : milestone, 1126,
master - mean (1,127ms) : 1109, 1146
. : milestone, 1127,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4739) - mean (271ms) : 267, 275
. : milestone, 271,
master - mean (272ms) : 269, 274
. : milestone, 272,
section CallTarget+Inlining+NGEN
This PR (4739) - mean (1,087ms) : 1065, 1108
. : milestone, 1087,
master - mean (1,090ms) : 1069, 1110
. : milestone, 1090,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4739) - mean (260ms) : 257, 262
. : milestone, 260,
master - mean (261ms) : 255, 267
. : milestone, 261,
section CallTarget+Inlining+NGEN
This PR (4739) - mean (1,055ms) : 1038, 1072
. : milestone, 1055,
master - mean (1,055ms) : 1022, 1087
. : milestone, 1055,
|
Benchmarks Report 🐌Benchmarks for #4739 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.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.56 KB | 42.09 KB | 529 B | 1.27% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 553μs | 1.15μs | 4.45μs | 0.553 | 0 | 0 | 41.68 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 651μs | 813ns | 3.04μs | 0.331 | 0 | 0 | 41.56 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 856μs | 3.56μs | 13.8μs | 8.13 | 2.57 | 0.428 | 53.36 KB |
#4739 | WriteAndFlushEnrichedTraces |
net6.0 | 554μs | 1.37μs | 5.29μs | 0.553 | 0 | 0 | 41.85 KB |
#4739 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 670μs | 2.63μs | 10.2μs | 0.34 | 0 | 0 | 42.09 KB |
#4739 | WriteAndFlushEnrichedTraces |
net472 | 821μs | 3.7μs | 14.3μs | 8.08 | 2.55 | 0.425 | 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.03μs | 0.979ns | 3.79ns | 0.0108 | 0 | 0 | 768 B |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.28μs | 0.562ns | 2.18ns | 0.0101 | 0 | 0 | 768 B |
master | ExecuteNonQuery |
net472 | 1.63μs | 0.373ns | 1.4ns | 0.116 | 0 | 0 | 730 B |
#4739 | ExecuteNonQuery |
net6.0 | 1.03μs | 0.584ns | 2.26ns | 0.0106 | 0 | 0 | 768 B |
#4739 | ExecuteNonQuery |
netcoreapp3.1 | 1.28μs | 0.578ns | 2.24ns | 0.0103 | 0 | 0 | 768 B |
#4739 | ExecuteNonQuery |
net472 | 1.63μs | 0.767ns | 2.87ns | 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.17μs | 0.644ns | 2.41ns | 0.0128 | 0 | 0 | 936 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.41μs | 0.567ns | 2.2ns | 0.0121 | 0 | 0 | 936 B |
master | CallElasticsearch |
net472 | 2.35μs | 0.777ns | 2.8ns | 0.151 | 0 | 0 | 955 B |
master | CallElasticsearchAsync |
net6.0 | 1.23μs | 0.785ns | 2.94ns | 0.0128 | 0 | 0 | 912 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.48μs | 2.62ns | 10.1ns | 0.0133 | 0 | 0 | 984 B |
master | CallElasticsearchAsync |
net472 | 2.55μs | 1.09ns | 4.08ns | 0.16 | 0 | 0 | 1.01 KB |
#4739 | CallElasticsearch |
net6.0 | 1.1μs | 0.356ns | 1.28ns | 0.0132 | 0 | 0 | 936 B |
#4739 | CallElasticsearch |
netcoreapp3.1 | 1.48μs | 5.41ns | 21ns | 0.0128 | 0 | 0 | 936 B |
#4739 | CallElasticsearch |
net472 | 2.33μs | 0.587ns | 2.12ns | 0.151 | 0 | 0 | 955 B |
#4739 | CallElasticsearchAsync |
net6.0 | 1.26μs | 0.386ns | 1.44ns | 0.0125 | 0 | 0 | 912 B |
#4739 | CallElasticsearchAsync |
netcoreapp3.1 | 1.52μs | 0.912ns | 3.29ns | 0.0129 | 0 | 0 | 984 B |
#4739 | CallElasticsearchAsync |
net472 | 2.49μs | 1.72ns | 6.65ns | 0.16 | 0 | 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.21μs | 1.11ns | 4.3ns | 0.0127 | 0 | 0 | 912 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.49μs | 0.664ns | 2.49ns | 0.012 | 0 | 0 | 912 B |
master | ExecuteAsync |
net472 | 1.62μs | 0.526ns | 2.04ns | 0.138 | 0 | 0 | 875 B |
#4739 | ExecuteAsync |
net6.0 | 1.2μs | 1.3ns | 4.88ns | 0.0126 | 0 | 0 | 912 B |
#4739 | ExecuteAsync |
netcoreapp3.1 | 1.6μs | 0.412ns | 1.59ns | 0.012 | 0 | 0 | 912 B |
#4739 | ExecuteAsync |
net472 | 1.74μs | 0.41ns | 1.48ns | 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.73μs | 1.25ns | 4.84ns | 0.0261 | 0 | 0 | 1.9 KB |
master | SendAsync |
netcoreapp3.1 | 4.42μs | 1.31ns | 4.91ns | 0.0332 | 0 | 0 | 2.43 KB |
master | SendAsync |
net472 | 7.17μs | 2.21ns | 8.57ns | 0.474 | 0 | 0 | 2.99 KB |
#4739 | SendAsync |
net6.0 | 3.71μs | 0.9ns | 3.37ns | 0.026 | 0 | 0 | 1.9 KB |
#4739 | SendAsync |
netcoreapp3.1 | 4.41μs | 2.33ns | 9.02ns | 0.0331 | 0 | 0 | 2.43 KB |
#4739 | SendAsync |
net472 | 7.1μs | 1.78ns | 6.89ns | 0.474 | 0 | 0 | 2.99 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.35μs | 0.449ns | 1.68ns | 0.0217 | 0 | 0 | 1.57 KB |
master | EnrichedLog |
netcoreapp3.1 | 1.95μs | 1.88ns | 7.03ns | 0.0214 | 0 | 0 | 1.57 KB |
master | EnrichedLog |
net472 | 2.29μs | 1.39ns | 5.21ns | 0.236 | 0 | 0 | 1.49 KB |
#4739 | EnrichedLog |
net6.0 | 1.32μs | 1.24ns | 4.64ns | 0.0218 | 0 | 0 | 1.57 KB |
#4739 | EnrichedLog |
netcoreapp3.1 | 2.07μs | 0.849ns | 3.29ns | 0.0216 | 0 | 0 | 1.57 KB |
#4739 | EnrichedLog |
net472 | 2.34μs | 2.02ns | 7.3ns | 0.236 | 0 | 0 | 1.49 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 | 66.5ns | 257ns | 0.0566 | 0 | 0 | 4.21 KB |
master | EnrichedLog |
netcoreapp3.1 | 119μs | 199ns | 769ns | 0 | 0 | 0 | 4.21 KB |
master | EnrichedLog |
net472 | 147μs | 86.7ns | 336ns | 0.658 | 0.219 | 0 | 4.38 KB |
#4739 | EnrichedLog |
net6.0 | 113μs | 98.7ns | 369ns | 0 | 0 | 0 | 4.21 KB |
#4739 | EnrichedLog |
netcoreapp3.1 | 120μs | 110ns | 413ns | 0.0595 | 0 | 0 | 4.21 KB |
#4739 | EnrichedLog |
net472 | 146μs | 79.7ns | 309ns | 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.8μs | 0.833ns | 3.12ns | 0.0293 | 0 | 0 | 2.13 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.87μs | 0.989ns | 3.7ns | 0.029 | 0 | 0 | 2.13 KB |
master | EnrichedLog |
net472 | 4.43μs | 1.13ns | 4.37ns | 0.307 | 0 | 0 | 1.93 KB |
#4739 | EnrichedLog |
net6.0 | 2.99μs | 0.936ns | 3.63ns | 0.0297 | 0 | 0 | 2.13 KB |
#4739 | EnrichedLog |
netcoreapp3.1 | 3.92μs | 1.02ns | 3.96ns | 0.0294 | 0 | 0 | 2.13 KB |
#4739 | EnrichedLog |
net472 | 4.61μs | 4.52ns | 17.5ns | 0.306 | 0 | 0 | 1.93 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.428ns | 1.6ns | 0.0153 | 0 | 0 | 1.1 KB |
master | SendReceive |
netcoreapp3.1 | 1.65μs | 1.38ns | 5.33ns | 0.0148 | 0 | 0 | 1.1 KB |
master | SendReceive |
net472 | 1.89μs | 2.69ns | 10.4ns | 0.177 | 0 | 0 | 1.12 KB |
#4739 | SendReceive |
net6.0 | 1.37μs | 0.669ns | 2.59ns | 0.015 | 0 | 0 | 1.1 KB |
#4739 | SendReceive |
netcoreapp3.1 | 1.63μs | 0.611ns | 2.36ns | 0.0146 | 0 | 0 | 1.1 KB |
#4739 | SendReceive |
net472 | 1.96μs | 0.611ns | 2.29ns | 0.176 | 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 | 0.615ns | 2.38ns | 0.0213 | 0 | 0 | 1.53 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.65μs | 0.768ns | 2.87ns | 0.02 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
net472 | 3.99μs | 2.56ns | 9.93ns | 0.309 | 0 | 0 | 1.96 KB |
#4739 | EnrichedLog |
net6.0 | 2.45μs | 0.86ns | 3.22ns | 0.0208 | 0 | 0 | 1.53 KB |
#4739 | EnrichedLog |
netcoreapp3.1 | 3.54μs | 1.29ns | 4.98ns | 0.0214 | 0 | 0 | 1.58 KB |
#4739 | EnrichedLog |
net472 | 3.99μs | 1.12ns | 4.19ns | 0.31 | 0 | 0 | 1.96 KB |
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #4739
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472
1.153
684.06
593.49
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.153 | 684.06 | 593.49 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 471ns | 0.189ns | 0.732ns | 0.00755 | 0 | 0 | 536 B |
master | StartFinishSpan |
netcoreapp3.1 | 580ns | 0.271ns | 1.05ns | 0.00728 | 0 | 0 | 536 B |
master | StartFinishSpan |
net472 | 684ns | 0.117ns | 0.451ns | 0.0854 | 0 | 0 | 538 B |
master | StartFinishScope |
net6.0 | 535ns | 0.154ns | 0.577ns | 0.00903 | 0 | 0 | 656 B |
master | StartFinishScope |
netcoreapp3.1 | 754ns | 0.158ns | 0.59ns | 0.00866 | 0 | 0 | 656 B |
master | StartFinishScope |
net472 | 881ns | 0.359ns | 1.34ns | 0.098 | 0 | 0 | 618 B |
#4739 | StartFinishSpan |
net6.0 | 444ns | 0.251ns | 0.972ns | 0.00742 | 0 | 0 | 536 B |
#4739 | StartFinishSpan |
netcoreapp3.1 | 566ns | 3.1ns | 17ns | 0.00731 | 0 | 0 | 536 B |
#4739 | StartFinishSpan |
net472 | 593ns | 0.185ns | 0.715ns | 0.0852 | 0 | 0 | 538 B |
#4739 | StartFinishScope |
net6.0 | 526ns | 0.135ns | 0.504ns | 0.0092 | 0 | 0 | 656 B |
#4739 | StartFinishScope |
netcoreapp3.1 | 743ns | 0.451ns | 1.75ns | 0.00895 | 0 | 0 | 656 B |
#4739 | StartFinishScope |
net472 | 854ns | 0.611ns | 2.36ns | 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 | 586ns | 0.177ns | 0.686ns | 0.00908 | 0 | 0 | 656 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 812ns | 2.49ns | 9.66ns | 0.00872 | 0 | 0 | 656 B |
master | RunOnMethodBegin |
net472 | 917ns | 0.284ns | 1.1ns | 0.098 | 0 | 0 | 618 B |
#4739 | RunOnMethodBegin |
net6.0 | 634ns | 0.209ns | 0.81ns | 0.0092 | 0 | 0 | 656 B |
#4739 | RunOnMethodBegin |
netcoreapp3.1 | 902ns | 1.86ns | 7.19ns | 0.00851 | 0 | 0 | 656 B |
#4739 | RunOnMethodBegin |
net472 | 978ns | 0.231ns | 0.896ns | 0.0981 | 0 | 0 | 618 B |
This solves problems around retrying throughput tests
16352f8
to
e8f8deb
Compare
Summary of changes
compare_throughput
stage if some results are missingReason for change
We had several issues:
Implementation details
continueOnError
when downloading the throughput resultsTest coverage
This is the test
Other details
Pre-requisite for @NachoEchevarria's work on enabling appsec throughput tests again