Add scope property to UserDetails#2706
Merged
Merged
Conversation
andrewlock
approved these changes
Apr 20, 2022
lucaspimentel
approved these changes
Apr 20, 2022
This comment has been minimized.
This comment has been minimized.
robertpi
force-pushed
the
appsec/robert/correct-user-details-new
branch
from
April 20, 2022 16:31
a77b03f to
7ec83e3
Compare
Member
Member
Benchmarks Report 🐌Benchmarks for #2706 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 - Unknown 🤷 Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️
|
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net472 | 1.136 | 3,191.92 | 2,809.24 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net472 | 3.11μs | 16.5ns | 82.6ns | 0.127 | 0 | 0 | 803 B |
| master | CallElasticsearch |
netcoreapp3.1 | 1.85μs | 9.87ns | 68.3ns | 0.0109 | 0 | 0 | 792 B |
| master | CallElasticsearchAsync |
net472 | 3.17μs | 16.6ns | 77.9ns | 0.149 | 0.00149 | 0 | 939 B |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 1.92μs | 10.6ns | 62.9ns | 0.0123 | 0 | 0 | 912 B |
| #2706 | CallElasticsearch |
net472 | 3.04μs | 17.3ns | 126ns | 0.125 | 0 | 0 | 802 B |
| #2706 | CallElasticsearch |
netcoreapp3.1 | 1.73μs | 8.7ns | 42.6ns | 0.0109 | 0 | 0 | 792 B |
| #2706 | CallElasticsearchAsync |
net472 | 2.81μs | 14.5ns | 66.3ns | 0.148 | 0 | 0 | 939 B |
| #2706 | CallElasticsearchAsync |
netcoreapp3.1 | 1.82μs | 7.89ns | 43.2ns | 0.012 | 0 | 0 | 912 B |
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #2706
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472
1.141
3,106.60
3,544.68
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 | 1.141 | 3,106.60 | 3,544.68 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net472 | 3.1μs | 15.8ns | 72.5ns | 0.168 | 0.00151 | 0 | 1.06 KB |
| master | ExecuteAsync |
netcoreapp3.1 | 2.1μs | 11.4ns | 60.3ns | 0.0138 | 0 | 0 | 1.03 KB |
| #2706 | ExecuteAsync |
net472 | 3.56μs | 17.9ns | 82ns | 0.168 | 0.00176 | 0 | 1.06 KB |
| #2706 | ExecuteAsync |
netcoreapp3.1 | 2.05μs | 7.99ns | 32ns | 0.0143 | 0 | 0 | 1.03 KB |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net472 | 6.69μs | 29.2ns | 113ns | 0.361 | 0 | 0 | 2.28 KB |
| master | SendAsync |
netcoreapp3.1 | 5.06μs | 23.5ns | 99.5ns | 0.031 | 0 | 0 | 2.21 KB |
| #2706 | SendAsync |
net472 | 7.1μs | 34.8ns | 152ns | 0.359 | 0 | 0 | 2.28 KB |
| #2706 | SendAsync |
netcoreapp3.1 | 4.83μs | 18.9ns | 73.1ns | 0.0317 | 0 | 0 | 2.21 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 |
net472 | 3.51μs | 14.7ns | 65.7ns | 0.226 | 0 | 0 | 1.45 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.12μs | 10.4ns | 40.2ns | 0.0216 | 0 | 0 | 1.53 KB |
| #2706 | EnrichedLog |
net472 | 3.36μs | 17.6ns | 82.4ns | 0.228 | 0 | 0 | 1.45 KB |
| #2706 | EnrichedLog |
netcoreapp3.1 | 3.09μs | 15.9ns | 73.1ns | 0.021 | 0 | 0 | 1.53 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 |
net472 | 285μs | 1.35μs | 5.56μs | 0.434 | 0.145 | 0 | 4.33 KB |
| master | EnrichedLog |
netcoreapp3.1 | 231μs | 1.23μs | 6.6μs | 0 | 0 | 0 | 4.21 KB |
| #2706 | EnrichedLog |
net472 | 283μs | 1.15μs | 4.46μs | 0.422 | 0.141 | 0 | 4.33 KB |
| #2706 | EnrichedLog |
netcoreapp3.1 | 233μs | 1.17μs | 5.25μs | 0 | 0 | 0 | 4.21 KB |
Benchmarks.Trace.NLogBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #2706
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net472
1.157
9,021.53
7,797.99
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net472 | 1.157 | 9,021.53 | 7,797.99 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net472 | 9.02μs | 50.1ns | 321ns | 0.502 | 0 | 0 | 3.23 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.6μs | 36.3ns | 224ns | 0.0503 | 0 | 0 | 3.6 KB |
| #2706 | EnrichedLog |
net472 | 7.81μs | 40.3ns | 201ns | 0.505 | 0 | 0 | 3.23 KB |
| #2706 | EnrichedLog |
netcoreapp3.1 | 6.55μs | 31ns | 120ns | 0.0506 | 0 | 0 | 3.6 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 |
net472 | 2.37μs | 8.2ns | 30.7ns | 0.16 | 0 | 0 | 1.01 KB |
| master | SendReceive |
netcoreapp3.1 | 2.17μs | 10.4ns | 44ns | 0.0138 | 0 | 0 | 1.01 KB |
| #2706 | SendReceive |
net472 | 2.37μs | 11.5ns | 48.7ns | 0.16 | 0 | 0 | 1.01 KB |
| #2706 | SendReceive |
netcoreapp3.1 | 2.22μs | 10.2ns | 38.3ns | 0.0145 | 0 | 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 |
net472 | 6.09μs | 33.9ns | 211ns | 0.292 | 0 | 0 | 1.87 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.33μs | 26.4ns | 156ns | 0.0192 | 0 | 0 | 1.49 KB |
| #2706 | EnrichedLog |
net472 | 6.08μs | 26ns | 145ns | 0.29 | 0 | 0 | 1.87 KB |
| #2706 | EnrichedLog |
netcoreapp3.1 | 5.13μs | 15.8ns | 56.9ns | 0.021 | 0 | 0 | 1.49 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net472 | 914ns | 4.9ns | 26.4ns | 0.0716 | 0 | 0 | 457 B |
| master | StartFinishSpan |
netcoreapp3.1 | 882ns | 4.38ns | 22.7ns | 0.00627 | 0 | 0 | 456 B |
| master | StartFinishScope |
net472 | 1.08μs | 4.92ns | 18.4ns | 0.0846 | 0 | 0 | 538 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.05μs | 5.34ns | 26.2ns | 0.00786 | 0 | 0 | 576 B |
| #2706 | StartFinishSpan |
net472 | 898ns | 3.1ns | 11.2ns | 0.072 | 0 | 0 | 457 B |
| #2706 | StartFinishSpan |
netcoreapp3.1 | 877ns | 3.66ns | 14.2ns | 0.00614 | 0 | 0 | 456 B |
| #2706 | StartFinishScope |
net472 | 1.08μs | 4.27ns | 16ns | 0.0843 | 0 | 0 | 538 B |
| #2706 | StartFinishScope |
netcoreapp3.1 | 1.03μs | 3.62ns | 13.5ns | 0.00818 | 0 | 0 | 576 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 |
net472 | 1.28μs | 6.7ns | 36.7ns | 0.0843 | 0 | 0 | 538 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.17μs | 5.73ns | 23.6ns | 0.0078 | 0 | 0 | 576 B |
| #2706 | RunOnMethodBegin |
net472 | 1.29μs | 6.89ns | 37.8ns | 0.084 | 0 | 0 | 538 B |
| #2706 | RunOnMethodBegin |
netcoreapp3.1 | 1.23μs | 7ns | 50.9ns | 0.0077 | 0 | 0 | 576 B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Add
scopetag toUserDetailsobject.Reason for change
Overlooked this property in #2546.