-
Notifications
You must be signed in to change notification settings - Fork 145
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
Enforced order in aspects generator #4342
Conversation
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
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.
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 (4342) - mean (3,037ms) : 2963, 3110
. : milestone, 3037,
master - mean (3,003ms) : 2923, 3083
. : milestone, 3003,
section CallTarget+Inlining+NGEN
This PR (4342) - mean (3,834ms) : 3744, 3925
. : milestone, 3834,
master - mean (3,813ms) : 3737, 3890
. : milestone, 3813,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4342) - mean (3,139ms) : 3042, 3236
. : milestone, 3139,
master - mean (3,144ms) : 3019, 3269
. : milestone, 3144,
section CallTarget+Inlining+NGEN
This PR (4342) - mean (3,637ms) : 3542, 3732
. : milestone, 3637,
master - mean (3,623ms) : 3582, 3663
. : milestone, 3623,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4342) - mean (3,114ms) : 2966, 3263
. : milestone, 3114,
master - mean (3,104ms) : 2998, 3209
. : milestone, 3104,
section CallTarget+Inlining+NGEN
This PR (4342) - mean (3,612ms) : 3529, 3694
. : milestone, 3612,
master - mean (3,615ms) : 3524, 3706
. : milestone, 3615,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4342) - mean (190ms) : 187, 193
. : milestone, 190,
master - mean (192ms) : 188, 197
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (4342) - mean (1,106ms) : 1070, 1142
. : milestone, 1106,
master - mean (1,121ms) : 1093, 1150
. : milestone, 1121,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4342) - mean (370ms) : 363, 376
. : milestone, 370,
master - mean (374ms) : 366, 381
. : milestone, 374,
section CallTarget+Inlining+NGEN
This PR (4342) - mean (1,162ms) : 1140, 1183
. : milestone, 1162,
master - mean (1,168ms) : 1145, 1191
. : milestone, 1168,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4342) - mean (358ms) : 354, 361
. : milestone, 358,
master - mean (363ms) : 358, 369
. : milestone, 363,
section CallTarget+Inlining+NGEN
This PR (4342) - mean (1,117ms) : 1091, 1144
. : milestone, 1117,
master - mean (1,128ms) : 1096, 1159
. : milestone, 1128,
|
Benchmarks Report 🐌Benchmarks for #4342 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 - 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 - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 | 1.174 | 1,284.66 | 1,507.59 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 1.28μs | 0.883ns | 3.42ns | 0.0225 | 0 | 0 | 1.62 KB |
master | EnrichedLog |
netcoreapp3.1 | 1.97μs | 6.68ns | 25ns | 0.022 | 0 | 0 | 1.62 KB |
master | EnrichedLog |
net472 | 2.28μs | 3.11ns | 12ns | 0.244 | 0 | 0 | 1.54 KB |
#4342 | EnrichedLog |
net6.0 | 1.51μs | 0.648ns | 2.51ns | 0.0228 | 0 | 0 | 1.62 KB |
#4342 | EnrichedLog |
netcoreapp3.1 | 1.92μs | 1.16ns | 4.35ns | 0.022 | 0 | 0 | 1.62 KB |
#4342 | EnrichedLog |
net472 | 2.38μs | 3.4ns | 13.1ns | 0.244 | 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 | 150ns | 581ns | 0.0556 | 0 | 0 | 4.21 KB |
master | EnrichedLog |
netcoreapp3.1 | 118μs | 139ns | 536ns | 0 | 0 | 0 | 4.21 KB |
master | EnrichedLog |
net472 | 149μs | 78.9ns | 305ns | 0.669 | 0.223 | 0 | 4.38 KB |
#4342 | EnrichedLog |
net6.0 | 111μs | 151ns | 584ns | 0.0553 | 0 | 0 | 4.21 KB |
#4342 | EnrichedLog |
netcoreapp3.1 | 119μs | 203ns | 787ns | 0 | 0 | 0 | 4.21 KB |
#4342 | EnrichedLog |
net472 | 148μs | 102ns | 394ns | 0.667 | 0.222 | 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 | 3.2μs | 0.717ns | 2.68ns | 0.0516 | 0 | 0 | 3.71 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.91μs | 1.39ns | 5.19ns | 0.0506 | 0 | 0 | 3.69 KB |
master | EnrichedLog |
net472 | 4.81μs | 1.57ns | 6.06ns | 0.526 | 0.0024 | 0 | 3.31 KB |
#4342 | EnrichedLog |
net6.0 | 3.08μs | 1.63ns | 5.87ns | 0.0524 | 0 | 0 | 3.71 KB |
#4342 | EnrichedLog |
netcoreapp3.1 | 3.78μs | 1.16ns | 4.32ns | 0.0494 | 0 | 0 | 3.69 KB |
#4342 | EnrichedLog |
net472 | 4.88μs | 1.64ns | 6.14ns | 0.525 | 0.00243 | 0 | 3.31 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.04μs | 0.598ns | 2.24ns | 0.0157 | 0 | 0 | 1.11 KB |
master | SendReceive |
netcoreapp3.1 | 1.39μs | 0.488ns | 1.76ns | 0.0146 | 0 | 0 | 1.11 KB |
master | SendReceive |
net472 | 1.81μs | 0.686ns | 2.66ns | 0.177 | 0.0009 | 0 | 1.12 KB |
#4342 | SendReceive |
net6.0 | 1.08μs | 0.611ns | 2.36ns | 0.0157 | 0 | 0 | 1.11 KB |
#4342 | SendReceive |
netcoreapp3.1 | 1.47μs | 0.697ns | 2.7ns | 0.0152 | 0 | 0 | 1.11 KB |
#4342 | SendReceive |
net472 | 1.75μs | 0.977ns | 3.52ns | 0.177 | 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.51μs | 0.724ns | 2.71ns | 0.0213 | 0 | 0 | 1.53 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.44μs | 1.03ns | 3.85ns | 0.0206 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
net472 | 4.03μs | 1.54ns | 5.97ns | 0.309 | 0 | 0 | 1.96 KB |
#4342 | EnrichedLog |
net6.0 | 2.53μs | 0.647ns | 2.33ns | 0.0216 | 0 | 0 | 1.53 KB |
#4342 | EnrichedLog |
netcoreapp3.1 | 3.55μs | 1.34ns | 5.18ns | 0.0212 | 0 | 0 | 1.58 KB |
#4342 | EnrichedLog |
net472 | 4.08μs | 2.46ns | 9.2ns | 0.309 | 0 | 0 | 1.96 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #4342
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1
1.233
483.30
595.95
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1
1.172
606.84
711.05
Faster 🎉 in #4342
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472
1.131
633.26
559.99
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 | 1.233 | 483.30 | 595.95 | |
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.172 | 606.84 | 711.05 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.131 | 633.26 | 559.99 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 384ns | 0.102ns | 0.367ns | 0.00754 | 0 | 0 | 536 B |
master | StartFinishSpan |
netcoreapp3.1 | 488ns | 2.07ns | 8.02ns | 0.00745 | 0 | 0 | 536 B |
master | StartFinishSpan |
net472 | 633ns | 0.299ns | 1.16ns | 0.0853 | 0 | 0 | 538 B |
master | StartFinishScope |
net6.0 | 504ns | 0.156ns | 0.561ns | 0.00935 | 0 | 0 | 656 B |
master | StartFinishScope |
netcoreapp3.1 | 608ns | 0.806ns | 5.04ns | 0.00902 | 0 | 0 | 656 B |
master | StartFinishScope |
net472 | 830ns | 0.21ns | 0.812ns | 0.098 | 0 | 0 | 618 B |
#4342 | StartFinishSpan |
net6.0 | 373ns | 0.171ns | 0.662ns | 0.00754 | 0 | 0 | 536 B |
#4342 | StartFinishSpan |
netcoreapp3.1 | 595ns | 0.383ns | 1.43ns | 0.00728 | 0 | 0 | 536 B |
#4342 | StartFinishSpan |
net472 | 560ns | 0.155ns | 0.599ns | 0.0853 | 0 | 0 | 538 B |
#4342 | StartFinishScope |
net6.0 | 467ns | 0.197ns | 0.738ns | 0.00917 | 0 | 0 | 656 B |
#4342 | StartFinishScope |
netcoreapp3.1 | 711ns | 0.369ns | 1.38ns | 0.00898 | 0 | 0 | 656 B |
#4342 | StartFinishScope |
net472 | 837ns | 0.961ns | 3.72ns | 0.0982 | 0 | 0 | 618 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #4342
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net472
1.126
1,018.20
903.91
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net472 | 1.126 | 1,018.20 | 903.91 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 607ns | 0.195ns | 0.731ns | 0.0091 | 0 | 0 | 656 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 815ns | 0.517ns | 2ns | 0.00893 | 0 | 0 | 656 B |
master | RunOnMethodBegin |
net472 | 1.02μs | 0.288ns | 1.11ns | 0.098 | 0 | 0 | 618 B |
#4342 | RunOnMethodBegin |
net6.0 | 561ns | 0.104ns | 0.388ns | 0.00902 | 0 | 0 | 656 B |
#4342 | RunOnMethodBegin |
netcoreapp3.1 | 767ns | 0.3ns | 1.16ns | 0.00858 | 0 | 0 | 656 B |
#4342 | RunOnMethodBegin |
net472 | 904ns | 0.269ns | 1.04ns | 0.0982 | 0 | 0 | 618 B |
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 (4342) (11.410M) : 0, 11409901
master (11.599M) : 0, 11599378
benchmarks/2.33.0 (11.479M) : 0, 11478658
benchmarks/2.9.0 (11.616M) : 0, 11615939
section Automatic
This PR (4342) (7.846M) : 0, 7846249
master (8.055M) : 0, 8054947
benchmarks/2.33.0 (8.034M) : 0, 8033885
benchmarks/2.9.0 (8.299M) : 0, 8298941
section Trace stats
master (8.149M) : 0, 8149446
benchmarks/2.33.0 (8.080M) : 0, 8079606
section Manual
This PR (4342) (10.272M) : 0, 10271632
master (10.317M) : 0, 10317381
benchmarks/2.33.0 (10.232M) : 0, 10231742
section Manual + Automatic
This PR (4342) (7.511M) : 0, 7511001
master (7.686M) : 0, 7686159
benchmarks/2.33.0 (7.752M) : 0, 7752117
section Version Conflict
master (6.913M) : 0, 6912986
benchmarks/2.33.0 (7.012M) : 0, 7012067
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4342) (9.685M) : 0, 9685490
master (9.476M) : 0, 9475856
benchmarks/2.33.0 (9.598M) : 0, 9597539
benchmarks/2.9.0 (9.733M) : 0, 9733009
section Automatic
This PR (4342) (6.746M) : 0, 6745833
master (6.662M) : 0, 6662022
benchmarks/2.33.0 (6.751M) : 0, 6750529
section Trace stats
master (6.701M) : 0, 6700692
benchmarks/2.33.0 (6.774M) : 0, 6774413
section Manual
This PR (4342) (8.417M) : 0, 8417213
master (8.469M) : 0, 8468774
benchmarks/2.33.0 (8.501M) : 0, 8501441
section Manual + Automatic
This PR (4342) (6.499M) : 0, 6499285
master (6.452M) : 0, 6452265
benchmarks/2.33.0 (6.462M) : 0, 6462321
section Version Conflict
master (5.838M) : 0, 5838213
benchmarks/2.33.0 (5.893M) : 0, 5893069
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4342) (10.489M) : 0, 10488902
master (10.442M) : 0, 10442227
benchmarks/2.33.0 (10.363M) : 0, 10362821
benchmarks/2.9.0 (10.346M) : 0, 10346419
section Automatic
This PR (4342) (7.643M) : 0, 7643401
master (7.536M) : 0, 7536033
benchmarks/2.33.0 (7.493M) : 0, 7492691
benchmarks/2.9.0 (7.623M) : 0, 7622680
section Trace stats
master (7.525M) : 0, 7525113
benchmarks/2.33.0 (7.623M) : 0, 7623012
section Manual
This PR (4342) (9.430M) : 0, 9429830
master (9.437M) : 0, 9437161
benchmarks/2.33.0 (9.386M) : 0, 9385628
section Manual + Automatic
This PR (4342) (7.157M) : 0, 7157065
master (7.210M) : 0, 7210429
benchmarks/2.33.0 (7.406M) : 0, 7405511
section Version Conflict
master (6.716M) : 0, 6715895
benchmarks/2.33.0 (6.732M) : 0, 6731683
gantt
title Throughput Linux x64 (ASM) (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4342) (7.693M) : 0, 7692748
master (7.667M) : 0, 7666584
benchmarks/2.33.0 (7.633M) : 0, 7633081
benchmarks/2.9.0 (7.992M) : 0, 7991917
section No attack
This PR (4342) (2.025M) : 0, 2025329
master (2.008M) : 0, 2008088
benchmarks/2.33.0 (2.194M) : 0, 2193954
benchmarks/2.9.0 (3.329M) : 0, 3328813
section Attack
This PR (4342) (1.775M) : 0, 1774823
master (1.710M) : 0, 1710018
benchmarks/2.33.0 (1.868M) : 0, 1867607
benchmarks/2.9.0 (2.603M) : 0, 2602671
section Blocking
This PR (4342) (3.776M) : 0, 3775652
master (3.806M) : 0, 3805880
benchmarks/2.33.0 (3.745M) : 0, 3745490
|
Summary of changes
Enforced order in aspects generator
Reason for change
Sometimes, aspects generator received income in different order, generating differences in aspects definitions files
Implementation details
Added order constraints in code generator