-
Notifications
You must be signed in to change notification settings - Fork 144
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] Allow .balloc/.pprof allocations comparison #4145
Conversation
Datadog ReportBranch report: ✅ |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Datadog ReportBranch report: ✅ |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
7bbbeed
to
05aca00
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…dd-trace-dotnet into chrisnas/compare_allocationtick
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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 (4145) (11.372M) : 0, 11371973
master (11.475M) : 0, 11475213
benchmarks/2.30.0 (11.396M) : 0, 11396155
benchmarks/2.9.0 (11.162M) : 0, 11161538
section Automatic
This PR (4145) (8.035M) : 0, 8034915
master (8.128M) : 0, 8127598
benchmarks/2.30.0 (8.045M) : 0, 8045041
benchmarks/2.9.0 (8.099M) : 0, 8099075
section Trace stats
master (8.179M) : 0, 8179237
benchmarks/2.30.0 (8.099M) : 0, 8098671
section Manual
This PR (4145) (10.299M) : 0, 10298855
master (10.162M) : 0, 10161650
benchmarks/2.30.0 (10.258M) : 0, 10257759
section Manual + Automatic
This PR (4145) (7.735M) : 0, 7734679
master (7.753M) : 0, 7752803
benchmarks/2.30.0 (7.688M) : 0, 7687842
section Version Conflict
master (6.986M) : 0, 6986186
benchmarks/2.30.0 (6.918M) : 0, 6918307
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4145) (9.533M) : 0, 9533372
master (9.539M) : 0, 9538609
benchmarks/2.30.0 (9.664M) : 0, 9664370
benchmarks/2.9.0 (9.705M) : 0, 9704781
section Automatic
This PR (4145) (6.917M) : 0, 6916974
master (6.864M) : 0, 6863582
benchmarks/2.30.0 (6.875M) : 0, 6874991
section Trace stats
master (6.835M) : 0, 6834794
benchmarks/2.30.0 (6.785M) : 0, 6785466
section Manual
This PR (4145) (8.478M) : 0, 8478093
master (8.303M) : 0, 8302727
benchmarks/2.30.0 (8.627M) : 0, 8626892
section Manual + Automatic
This PR (4145) (6.444M) : 0, 6444276
master (6.722M) : 0, 6721597
benchmarks/2.30.0 (6.606M) : 0, 6605836
section Version Conflict
master (5.916M) : 0, 5915558
benchmarks/2.30.0 (6.013M) : 0, 6013339
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4145) (10.599M) : 0, 10599417
master (10.593M) : 0, 10593309
benchmarks/2.30.0 (9.923M) : 0, 9922507
benchmarks/2.9.0 (9.827M) : 0, 9827121
section Automatic
This PR (4145) (7.507M) : 0, 7506521
master (7.678M) : 0, 7678163
benchmarks/2.30.0 (7.303M) : 0, 7303475
benchmarks/2.9.0 (7.246M) : 0, 7246397
section Trace stats
master (7.483M) : 0, 7482939
benchmarks/2.30.0 (7.160M) : 0, 7160245
section Manual
This PR (4145) (9.333M) : 0, 9332747
master (9.341M) : 0, 9340935
benchmarks/2.30.0 (8.927M) : 0, 8926998
section Manual + Automatic
This PR (4145) (7.198M) : 0, 7197530
master (7.285M) : 0, 7284711
benchmarks/2.30.0 (6.939M) : 0, 6938944
section Version Conflict
master (6.512M) : 0, 6511696
benchmarks/2.30.0 (6.073M) : 0, 6073065
gantt
title Throughput Linux x64 (ASM) (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4145) (7.570M) : 0, 7570450
master (7.627M) : 0, 7626918
benchmarks/2.30.0 (7.531M) : 0, 7531334
benchmarks/2.9.0 (7.748M) : 0, 7748029
section No attack
This PR (4145) (2.426M) : 0, 2426118
master (2.454M) : 0, 2454365
benchmarks/2.30.0 (2.446M) : 0, 2445800
benchmarks/2.9.0 (3.274M) : 0, 3273699
section Attack
This PR (4145) (2.081M) : 0, 2081338
master (2.061M) : 0, 2060891
benchmarks/2.30.0 (2.085M) : 0, 2084501
benchmarks/2.9.0 (2.598M) : 0, 2597950
section Blocking
This PR (4145) (4.240M) : 0, 4239888
master (4.180M) : 0, 4179531
benchmarks/2.30.0 (4.158M) : 0, 4157829
|
Datadog ReportBranch report: ✅ |
Benchmarks Report 🐌Benchmarks for #4145 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AppSecBodyBenchmark - 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 - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑netcoreapp3.1 | 1.118 | 1,200.11 | 1,341.52 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
netcoreapp3.1 | 1.19μs | 0.294ns | 1.14ns | 0.0101 | 0 | 0 | 752 B |
master | CallElasticsearch |
net472 | 1.92μs | 0.474ns | 1.84ns | 0.121 | 0.000958 | 0 | 762 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.2μs | 0.58ns | 2.25ns | 0.0108 | 0 | 0 | 800 B |
master | CallElasticsearchAsync |
net472 | 2.16μs | 0.849ns | 3.06ns | 0.13 | 0.00108 | 0 | 819 B |
#4145 | CallElasticsearch |
netcoreapp3.1 | 1.17μs | 1ns | 3.89ns | 0.01 | 0 | 0 | 752 B |
#4145 | CallElasticsearch |
net472 | 1.98μs | 0.826ns | 3.2ns | 0.121 | 0.000989 | 0 | 762 B |
#4145 | CallElasticsearchAsync |
netcoreapp3.1 | 1.34μs | 1.3ns | 4.69ns | 0.0106 | 0 | 0 | 800 B |
#4145 | CallElasticsearchAsync |
net472 | 2.14μs | 0.383ns | 1.48ns | 0.129 | 0.00107 | 0 | 819 B |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteAsync |
netcoreapp3.1 | 1.34μs | 1.23ns | 4.43ns | 0.0126 | 0 | 0 | 920 B |
master | ExecuteAsync |
net472 | 1.53μs | 0.603ns | 2.34ns | 0.14 | 0.000763 | 0 | 883 B |
#4145 | ExecuteAsync |
netcoreapp3.1 | 1.33μs | 0.341ns | 1.23ns | 0.0124 | 0 | 0 | 920 B |
#4145 | ExecuteAsync |
net472 | 1.52μs | 0.569ns | 2.2ns | 0.14 | 0.000763 | 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 |
netcoreapp3.1 | 4.24μs | 1.63ns | 6.1ns | 0.0298 | 0 | 0 | 2.26 KB |
master | SendAsync |
net472 | 6.65μs | 2.18ns | 8.43ns | 0.446 | 0 | 0 | 2.82 KB |
#4145 | SendAsync |
netcoreapp3.1 | 4.14μs | 1.71ns | 6.4ns | 0.0309 | 0 | 0 | 2.26 KB |
#4145 | SendAsync |
net472 | 6.63μs | 1.64ns | 6.33ns | 0.447 | 0 | 0 | 2.82 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 |
netcoreapp3.1 | 1.9μs | 1.26ns | 4.73ns | 0.0218 | 0 | 0 | 1.63 KB |
master | EnrichedLog |
net472 | 2.21μs | 1.22ns | 4.55ns | 0.245 | 0 | 0 | 1.55 KB |
#4145 | EnrichedLog |
netcoreapp3.1 | 2.03μs | 3.06ns | 11.9ns | 0.022 | 0 | 0 | 1.63 KB |
#4145 | EnrichedLog |
net472 | 2.27μs | 1.33ns | 4.8ns | 0.246 | 0 | 0 | 1.55 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 |
netcoreapp3.1 | 117μs | 238ns | 922ns | 0.0579 | 0 | 0 | 4.22 KB |
master | EnrichedLog |
net472 | 148μs | 99.2ns | 384ns | 0.665 | 0.222 | 0 | 4.39 KB |
#4145 | EnrichedLog |
netcoreapp3.1 | 116μs | 222ns | 861ns | 0.0581 | 0 | 0 | 4.22 KB |
#4145 | EnrichedLog |
net472 | 147μs | 231ns | 896ns | 0.658 | 0.219 | 0 | 4.39 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 |
netcoreapp3.1 | 3.79μs | 1.97ns | 7.37ns | 0.0491 | 0 | 0 | 3.7 KB |
master | EnrichedLog |
net472 | 4.75μs | 1.33ns | 4.96ns | 0.526 | 0.00237 | 0 | 3.32 KB |
#4145 | EnrichedLog |
netcoreapp3.1 | 3.78μs | 1.28ns | 4.96ns | 0.0511 | 0 | 0 | 3.7 KB |
#4145 | EnrichedLog |
net472 | 4.8μs | 1.53ns | 5.93ns | 0.526 | 0.0024 | 0 | 3.32 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 |
netcoreapp3.1 | 1.45μs | 0.667ns | 2.58ns | 0.0136 | 0 | 0 | 1.01 KB |
master | SendReceive |
net472 | 1.63μs | 0.719ns | 2.49ns | 0.16 | 0 | 0 | 1.01 KB |
#4145 | SendReceive |
netcoreapp3.1 | 1.48μs | 0.374ns | 1.35ns | 0.0133 | 0 | 0 | 1.01 KB |
#4145 | SendReceive |
net472 | 1.67μs | 1.46ns | 5.26ns | 0.16 | 0.000829 | 0 | 1.01 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 |
netcoreapp3.1 | 3.53μs | 2.42ns | 9.04ns | 0.0212 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
net472 | 3.99μs | 1.4ns | 5.42ns | 0.311 | 0 | 0 | 1.97 KB |
#4145 | EnrichedLog |
netcoreapp3.1 | 3.6μs | 2.71ns | 10.1ns | 0.0199 | 0 | 0 | 1.58 KB |
#4145 | EnrichedLog |
net472 | 4.03μs | 1.57ns | 5.65ns | 0.311 | 0 | 0 | 1.97 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #4145
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472
1.138
590.42
672.02
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.138 | 590.42 | 672.02 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
netcoreapp3.1 | 553ns | 0.498ns | 1.93ns | 0.0075 | 0 | 0 | 544 B |
master | StartFinishSpan |
net472 | 590ns | 0.176ns | 0.68ns | 0.0866 | 0 | 0 | 546 B |
master | StartFinishScope |
netcoreapp3.1 | 666ns | 0.294ns | 1.1ns | 0.00883 | 0 | 0 | 664 B |
master | StartFinishScope |
net472 | 791ns | 0.39ns | 1.51ns | 0.0992 | 0 | 0 | 626 B |
#4145 | StartFinishSpan |
netcoreapp3.1 | 556ns | 0.331ns | 1.24ns | 0.0073 | 0 | 0 | 544 B |
#4145 | StartFinishSpan |
net472 | 672ns | 0.175ns | 0.677ns | 0.0867 | 0 | 0 | 546 B |
#4145 | StartFinishScope |
netcoreapp3.1 | 649ns | 0.283ns | 1.06ns | 0.0091 | 0 | 0 | 664 B |
#4145 | StartFinishScope |
net472 | 791ns | 0.522ns | 2.02ns | 0.0992 | 0 | 0 | 626 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 |
netcoreapp3.1 | 842ns | 1.3ns | 4.5ns | 0.00905 | 0 | 0 | 664 B |
master | RunOnMethodBegin |
net472 | 965ns | 0.524ns | 2.03ns | 0.0994 | 0 | 0 | 626 B |
#4145 | RunOnMethodBegin |
netcoreapp3.1 | 870ns | 0.642ns | 2.49ns | 0.00872 | 0 | 0 | 664 B |
#4145 | RunOnMethodBegin |
net472 | 1.01μs | 0.662ns | 2.48ns | 0.0992 | 0 | 0 | 626 B |
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 (4145) - mean (3,044ms) : 2945, 3143
. : milestone, 3044,
master - mean (3,018ms) : 2929, 3106
. : milestone, 3018,
section CallTarget+Inlining+NGEN
This PR (4145) - mean (3,761ms) : 3656, 3867
. : milestone, 3761,
master - mean (3,763ms) : 3677, 3850
. : milestone, 3763,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4145) - mean (3,143ms) : 3029, 3257
. : milestone, 3143,
master - mean (3,158ms) : 3066, 3249
. : milestone, 3158,
section CallTarget+Inlining+NGEN
This PR (4145) - mean (3,595ms) : 3516, 3674
. : milestone, 3595,
master - mean (3,574ms) : 3500, 3648
. : milestone, 3574,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4145) - mean (3,151ms) : 3029, 3273
. : milestone, 3151,
master - mean (3,121ms) : 2996, 3247
. : milestone, 3121,
section CallTarget+Inlining+NGEN
This PR (4145) - mean (3,575ms) : 3495, 3655
. : milestone, 3575,
master - mean (3,563ms) : 3508, 3618
. : milestone, 3563,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4145) - mean (187ms) : 184, 191
. : milestone, 187,
master - mean (188ms) : 183, 193
. : milestone, 188,
section CallTarget+Inlining+NGEN
This PR (4145) - mean (1,029ms) : 984, 1074
. : milestone, 1029,
master - mean (1,034ms) : 1003, 1065
. : milestone, 1034,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4145) - mean (367ms) : 362, 373
. : milestone, 367,
master - mean (370ms) : 362, 377
. : milestone, 370,
section CallTarget+Inlining+NGEN
This PR (4145) - mean (1,133ms) : 1102, 1165
. : milestone, 1133,
master - mean (1,129ms) : 1099, 1159
. : milestone, 1129,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4145) - mean (355ms) : 350, 361
. : milestone, 355,
master - mean (356ms) : 349, 362
. : milestone, 356,
section CallTarget+Inlining+NGEN
This PR (4145) - mean (1,090ms) : 1053, 1127
. : milestone, 1090,
master - mean (1,091ms) : 1066, 1116
. : milestone, 1091,
|
Summary of changes
Allow comparison between recorded allocations in .balloc and sampled ones in the corresponding .pprof file.
In addition, sampled values are also shown in the simulator in addition to the upscaled ones.
Reason for change
This is a step asked by Microsoft for dotnet/runtime#85750
Implementation details
Open a .pprof file and extract allocation samples (using the same method as in our tests) to be compared against the real allocations recorded in the corresponding .balloc file.
Test coverage
Other details