-
Notifications
You must be signed in to change notification settings - Fork 151
Remove more [PublicApi] usages and unused code
#7786
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
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This comment has been minimized.
This comment has been minimized.
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7786 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.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower
|
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.412 | 298,978.50 | 721,233.85 | |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.079 | 412,767.50 | 858,194.69 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 406μs | 111ns | 400ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 413μs | 229ns | 885ns | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 447μs | 101ns | 391ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 294μs | 118ns | 457ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 299μs | 161ns | 556ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 319μs | 49.9ns | 180ns | 0 | 0 | 0 | 2.28 KB |
| #7786 | RunWafRealisticBenchmark |
net6.0 | 401μs | 54.2ns | 195ns | 0 | 0 | 0 | 4.55 KB |
| #7786 | RunWafRealisticBenchmark |
netcoreapp3.1 | 833μs | 9.93μs | 99.3μs | 0 | 0 | 0 | 4.48 KB |
| #7786 | RunWafRealisticBenchmark |
net472 | 427μs | 62.9ns | 243ns | 0 | 0 | 0 | 4.66 KB |
| #7786 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 285μs | 59.3ns | 214ns | 0 | 0 | 0 | 2.24 KB |
| #7786 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 675μs | 13.3μs | 131μs | 0 | 0 | 0 | 2.22 KB |
| #7786 | RunWafRealisticBenchmarkWithAttack |
net472 | 309μs | 34.7ns | 130ns | 0 | 0 | 0 | 2.29 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 | 62.2μs | 87.6ns | 303ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.8μs | 76.2ns | 285ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.0175ns | 0.00341ns | 0.0132ns | 0 | 0 | 0 | 0 b |
| #7786 | SendRequest |
net6.0 | 61.7μs | 55.5ns | 192ns | 0 | 0 | 0 | 14.52 KB |
| #7786 | SendRequest |
netcoreapp3.1 | 72.6μs | 161ns | 601ns | 0 | 0 | 0 | 17.42 KB |
| #7786 | SendRequest |
net472 | 0ns | 0ns | 0ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7786
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
2 B
4 B
2 B
100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
2 B
4 B
2 B
100.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 2 B | 4 B | 2 B | 100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 2 B | 4 B | 2 B | 100.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.86ms | 3.83μs | 14.9μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.05ms | 4.47μs | 16.1μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.69ms | 2.18μs | 8.46μs | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.44ms | 1.36μs | 5.28μs | 0 | 0 | 0 | 2 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.65ms | 264ns | 989ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.9ms | 298ns | 1.12μs | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 820μs | 66.1ns | 256ns | 0 | 0 | 0 | 2 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 811μs | 61.5ns | 238ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.19ms | 98.4ns | 381ns | 0 | 0 | 0 | 47 B |
| #7786 | OriginalCharSlice |
net6.0 | 1.89ms | 6.54μs | 25.3μs | 0 | 0 | 0 | 640.01 KB |
| #7786 | OriginalCharSlice |
netcoreapp3.1 | 2.25ms | 7.34μs | 26.5μs | 0 | 0 | 0 | 640 KB |
| #7786 | OriginalCharSlice |
net472 | 2.59ms | 135ns | 506ns | 100 | 0 | 0 | 641.95 KB |
| #7786 | OptimizedCharSlice |
net6.0 | 1.37ms | 333ns | 1.25μs | 0 | 0 | 0 | 4 B |
| #7786 | OptimizedCharSlice |
netcoreapp3.1 | 1.85ms | 14.1μs | 141μs | 0 | 0 | 0 | 1 B |
| #7786 | OptimizedCharSlice |
net472 | 1.91ms | 142ns | 548ns | 0 | 0 | 0 | 73 B |
| #7786 | OptimizedCharSliceWithPool |
net6.0 | 899μs | 23ns | 89ns | 0 | 0 | 0 | 4 B |
| #7786 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 838μs | 172ns | 667ns | 0 | 0 | 0 | 1 B |
| #7786 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 171ns | 661ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7786
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.57 KB
42.23 KB
660 B
1.59%
Fewer allocations 🎉 in #7786
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
55.98 KB
55.62 KB
-360 B
-0.64%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.57 KB | 42.23 KB | 660 B | 1.59% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 55.98 KB | 55.62 KB | -360 B | -0.64% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 747μs | 1.15μs | 4.45μs | 0 | 0 | 0 | 41.57 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 772μs | 5.49μs | 54.9μs | 0 | 0 | 0 | 41.76 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 931μs | 4.28μs | 16.6μs | 8.33 | 0 | 0 | 55.98 KB |
| #7786 | WriteAndFlushEnrichedTraces |
net6.0 | 737μs | 3.57μs | 15.6μs | 0 | 0 | 0 | 42.23 KB |
| #7786 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 717μs | 3.88μs | 22μs | 0 | 0 | 0 | 41.85 KB |
| #7786 | WriteAndFlushEnrichedTraces |
net472 | 878μs | 4.27μs | 18.1μs | 4.46 | 0 | 0 | 55.62 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.9μs | 9.66ns | 44.3ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.62μs | 12.6ns | 53.6ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.87μs | 3.83ns | 14.3ns | 0.156 | 0.0142 | 0 | 987 B |
| #7786 | ExecuteNonQuery |
net6.0 | 1.97μs | 10.5ns | 52.5ns | 0 | 0 | 0 | 1.02 KB |
| #7786 | ExecuteNonQuery |
netcoreapp3.1 | 2.59μs | 7.84ns | 30.4ns | 0 | 0 | 0 | 1.02 KB |
| #7786 | ExecuteNonQuery |
net472 | 2.81μs | 4.18ns | 16.2ns | 0.154 | 0.014 | 0 | 987 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.73μs | 1.46ns | 5.65ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.18μs | 11.1ns | 49.8ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.53μs | 1.9ns | 6.84ns | 0.158 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.84μs | 7.43ns | 28.8ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.36μs | 8.34ns | 32.3ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.63μs | 0.776ns | 2.8ns | 0.163 | 0 | 0 | 1.1 KB |
| #7786 | CallElasticsearch |
net6.0 | 1.71μs | 8.86ns | 41.6ns | 0 | 0 | 0 | 1.03 KB |
| #7786 | CallElasticsearch |
netcoreapp3.1 | 2.25μs | 10.5ns | 43.2ns | 0 | 0 | 0 | 1.03 KB |
| #7786 | CallElasticsearch |
net472 | 3.59μs | 1.87ns | 7.26ns | 0.161 | 0 | 0 | 1.04 KB |
| #7786 | CallElasticsearchAsync |
net6.0 | 1.87μs | 2.4ns | 8.99ns | 0 | 0 | 0 | 1.01 KB |
| #7786 | CallElasticsearchAsync |
netcoreapp3.1 | 2.43μs | 9.01ns | 33.7ns | 0 | 0 | 0 | 1.08 KB |
| #7786 | CallElasticsearchAsync |
net472 | 3.79μs | 4.72ns | 18.3ns | 0.17 | 0 | 0 | 1.1 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.87μs | 4.01ns | 15.5ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.51μs | 8.35ns | 32.3ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.58μs | 1.31ns | 4.89ns | 0.141 | 0 | 0 | 915 B |
| #7786 | ExecuteAsync |
net6.0 | 1.88μs | 3.78ns | 14.7ns | 0 | 0 | 0 | 952 B |
| #7786 | ExecuteAsync |
netcoreapp3.1 | 2.5μs | 11.3ns | 43.6ns | 0 | 0 | 0 | 952 B |
| #7786 | ExecuteAsync |
net472 | 2.62μs | 3.14ns | 12.2ns | 0.143 | 0 | 0 | 915 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 | 7.19μs | 3.43ns | 12.4ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.67μs | 19.4ns | 75ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.5μs | 8.63ns | 33.4ns | 0.497 | 0 | 0 | 3.18 KB |
| #7786 | SendAsync |
net6.0 | 6.89μs | 17.8ns | 66.6ns | 0 | 0 | 0 | 2.36 KB |
| #7786 | SendAsync |
netcoreapp3.1 | 8.66μs | 5.77ns | 22.4ns | 0 | 0 | 0 | 2.9 KB |
| #7786 | SendAsync |
net472 | 12.4μs | 6.82ns | 25.5ns | 0.494 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7786
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
1.200
453,550.00
544,050.00
More allocations ⚠️ in #7786
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
275.24 KB
280.06 KB
4.82 KB
1.75%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
274.41 KB
278.12 KB
3.71 KB
1.35%
Fewer allocations 🎉 in #7786
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
45.32 KB
43.61 KB
-1.71 KB
-3.78%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 1.200 | 453,550.00 | 544,050.00 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 275.24 KB | 280.06 KB | 4.82 KB | 1.75% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 274.41 KB | 278.12 KB | 3.71 KB | 1.35% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 45.32 KB | 43.61 KB | -1.71 KB | -3.78% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 44.9μs | 314ns | 2.93μs | 0 | 0 | 0 | 45.32 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 51.9μs | 506ns | 4.83μs | 0 | 0 | 0 | 42.9 KB |
| master | StringConcatBenchmark |
net472 | 56.5μs | 270ns | 1.05μs | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 470μs | 1.99μs | 7.18μs | 0 | 0 | 0 | 274.41 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 468μs | 5.37μs | 52.3μs | 0 | 0 | 0 | 275.95 KB |
| master | StringConcatAspectBenchmark |
net472 | 417μs | 2.31μs | 14.4μs | 0 | 0 | 0 | 275.24 KB |
| #7786 | StringConcatBenchmark |
net6.0 | 44.6μs | 299ns | 2.82μs | 0 | 0 | 0 | 43.61 KB |
| #7786 | StringConcatBenchmark |
netcoreapp3.1 | 49.9μs | 292ns | 2.37μs | 0 | 0 | 0 | 42.73 KB |
| #7786 | StringConcatBenchmark |
net472 | 57.3μs | 163ns | 609ns | 0 | 0 | 0 | 57.34 KB |
| #7786 | StringConcatAspectBenchmark |
net6.0 | 488μs | 2.38μs | 9.53μs | 0 | 0 | 0 | 278.12 KB |
| #7786 | StringConcatAspectBenchmark |
netcoreapp3.1 | 544μs | 1.73μs | 6.24μs | 0 | 0 | 0 | 276.34 KB |
| #7786 | StringConcatAspectBenchmark |
net472 | 400μs | 2.29μs | 16.7μs | 0 | 0 | 0 | 280.06 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 | 2.67μs | 13.5ns | 58.8ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.6μs | 17.5ns | 74.4ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 4.02μs | 4.38ns | 16.4ns | 0.241 | 0 | 0 | 1.64 KB |
| #7786 | EnrichedLog |
net6.0 | 2.63μs | 12.2ns | 48.8ns | 0 | 0 | 0 | 1.7 KB |
| #7786 | EnrichedLog |
netcoreapp3.1 | 3.64μs | 18.3ns | 77.6ns | 0 | 0 | 0 | 1.7 KB |
| #7786 | EnrichedLog |
net472 | 3.91μs | 3.14ns | 12.1ns | 0.253 | 0 | 0 | 1.64 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 | 121μs | 64.4ns | 241ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 128μs | 244ns | 944ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 167μs | 105ns | 406ns | 0 | 0 | 0 | 4.52 KB |
| #7786 | EnrichedLog |
net6.0 | 128μs | 165ns | 638ns | 0 | 0 | 0 | 4.31 KB |
| #7786 | EnrichedLog |
netcoreapp3.1 | 132μs | 257ns | 963ns | 0 | 0 | 0 | 4.31 KB |
| #7786 | EnrichedLog |
net472 | 172μs | 773ns | 2.99μs | 0 | 0 | 0 | 4.52 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 | 5.13μs | 7.62ns | 28.5ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.77μs | 16.5ns | 63.7ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.49μs | 5.68ns | 22ns | 0.299 | 0 | 0 | 2.08 KB |
| #7786 | EnrichedLog |
net6.0 | 5.04μs | 24.1ns | 102ns | 0 | 0 | 0 | 2.26 KB |
| #7786 | EnrichedLog |
netcoreapp3.1 | 6.81μs | 14.4ns | 55.7ns | 0 | 0 | 0 | 2.26 KB |
| #7786 | EnrichedLog |
net472 | 7.57μs | 7.86ns | 29.4ns | 0.303 | 0 | 0 | 2.08 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.93μs | 10ns | 49.1ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.65μs | 12.4ns | 48.2ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.05μs | 1.37ns | 5.12ns | 0.182 | 0 | 0 | 1.2 KB |
| #7786 | SendReceive |
net6.0 | 1.94μs | 10.3ns | 51.3ns | 0 | 0 | 0 | 1.2 KB |
| #7786 | SendReceive |
netcoreapp3.1 | 2.62μs | 13.6ns | 63.7ns | 0 | 0 | 0 | 1.2 KB |
| #7786 | SendReceive |
net472 | 2.99μs | 2.29ns | 8.88ns | 0.18 | 0 | 0 | 1.2 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 | 4.25μs | 16.5ns | 59.5ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.64μs | 11.1ns | 42.9ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.55μs | 5.53ns | 21.4ns | 0.293 | 0 | 0 | 2.03 KB |
| #7786 | EnrichedLog |
net6.0 | 4.29μs | 12.2ns | 47.2ns | 0 | 0 | 0 | 1.58 KB |
| #7786 | EnrichedLog |
netcoreapp3.1 | 5.61μs | 17.1ns | 66.2ns | 0 | 0 | 0 | 1.63 KB |
| #7786 | EnrichedLog |
net472 | 6.89μs | 10.3ns | 39.8ns | 0.309 | 0 | 0 | 2.03 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 |
net6.0 | 785ns | 0.322ns | 1.25ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 966ns | 4.8ns | 22.5ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 920ns | 0.57ns | 2.21ns | 0.0878 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 924ns | 1.26ns | 4.86ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.24μs | 5.83ns | 22.6ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.11μs | 1.01ns | 3.63ns | 0.101 | 0 | 0 | 658 B |
| #7786 | StartFinishSpan |
net6.0 | 779ns | 0.26ns | 1.01ns | 0 | 0 | 0 | 576 B |
| #7786 | StartFinishSpan |
netcoreapp3.1 | 987ns | 5.01ns | 24ns | 0 | 0 | 0 | 576 B |
| #7786 | StartFinishSpan |
net472 | 955ns | 1.46ns | 5.64ns | 0.0904 | 0 | 0 | 578 B |
| #7786 | StartFinishScope |
net6.0 | 930ns | 4.41ns | 17.7ns | 0 | 0 | 0 | 696 B |
| #7786 | StartFinishScope |
netcoreapp3.1 | 1.21μs | 5.73ns | 23.6ns | 0 | 0 | 0 | 696 B |
| #7786 | StartFinishScope |
net472 | 1.13μs | 0.716ns | 2.77ns | 0.104 | 0 | 0 | 658 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 | 1.07μs | 5.35ns | 22.7ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.42μs | 4.5ns | 17.4ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.51μs | 1.53ns | 5.71ns | 0.0981 | 0 | 0 | 658 B |
| #7786 | RunOnMethodBegin |
net6.0 | 1.08μs | 3.1ns | 12ns | 0 | 0 | 0 | 696 B |
| #7786 | RunOnMethodBegin |
netcoreapp3.1 | 1.43μs | 4.14ns | 15.5ns | 0 | 0 | 0 | 696 B |
| #7786 | RunOnMethodBegin |
net472 | 1.48μs | 1.76ns | 6.59ns | 0.101 | 0 | 0 | 658 B |
3238dc9 to
1c911e2
Compare
| /// Initializes a new instance of the <see cref="SpanContext"/> class | ||
| /// from a propagated context. <see cref="Parent"/> will be null | ||
| /// since this is a root context locally. | ||
| /// Internal for testing |
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.
| /// Internal for testing |
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.
This one is still internal for testing 😄 I replace this with the attribute in the last of the stack 😉
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.
Nevermind I see why this is here
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.
I didn't refresh so I didn't see your comment 🤣
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.
It's public, though. Not internal.
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.
public/internal... it's all the same these days in Datadog.Trace 😛
| /// </summary> | ||
| /// <param name="nameValueCollection">The collection that will be wrapped by this configuration source.</param> | ||
| [PublicApi] | ||
| // Internal for testing only |
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.
It's public, not internal.
| [InlineData("key: value")] // space before value | ||
| [InlineData("key: value ")] // 1 space around value | ||
| [InlineData("key: value ")] // 2 spaces around value | ||
| public void ParseCustomKeyValues_WhitespaceAroundValue(string entry) |
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.
Why remove these?
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.
StringConfigurationSource.ParseCustomKeyValues was deleted. Perhaps it wasn't used in product code and only referenced here?
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.
Exactly, it was only used in this test, so I deleted the method + the test
## Summary of changes Deletes a bunch of enum members from `PublicApiUsage` which are unused ## Reason for change These were unused or _couldn't_ logically be called in production code, so were just adding overhead as we allocate the array to record them. Fixed one case where we _Should_ have been recording it, but weren't ## Implementation details FindAllReferences on each member => if it's not used in Datadog.Trace, remove it ## Test coverage Covered by existing ## Other details Part of a stack - #7786 - #7787 👈 - #7788
## Summary of changes Repurposes the now-defunct `PublicApiAnalyzer` to an `InternalForTestingAnalyzer` ## Reason for change We have various methods in `Datadog.Trace` that should never be called by production code, and are only exposed to make testing functionality easier. Currently we rely on method names and comments to avoid this. With this change, we can add an attribute instead, and using the method from Datadog.Trace etc becomes a build error. ## Implementation details - Basically just renamed `PublicApi*` -> `InternalForTesting*` - Decorated methods that were currently relying on comments/naming to avoid being called ## Test coverage Refactored the analyzer tests, so should still be covered the same ## Other details Note that there are a bunch of comments for methods `// internal for testing` which are a bit different. In those cases, we _do_ call it in Datadog.Trace, the comment is just explaining why the method isn't `private`. Those remain as-is, this attribute is purely if you have a "don't call this method in production code, use that other one instead" method 😄 Part of a stack - #7786 - #7787 - #7788 👈
Summary of changes
[PublicApi]usages that aren't necessary any moreDebugEnabledInternal=>DebugEnabledReason for change
Cleaning up
Implementation details
Mostly del
Test coverage
Covered by existing
Other details
Part of a stack
[PublicApi]usages and unused code #7786 👈PublicApiUsagemembers #7787PublicApiAnalyzerasInternalForTestingAnalyzer#7788