-
Notifications
You must be signed in to change notification settings - Fork 143
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
Vendor in Microsoft.OpenApi #6461
base: master
Are you sure you want to change the base?
Conversation
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 (6461) - mean (69ms) : 65, 72
. : milestone, 69,
master - mean (68ms) : 66, 71
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (6461) - mean (976ms) : 952, 1000
. : milestone, 976,
master - mean (980ms) : 955, 1006
. : milestone, 980,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6461) - mean (108ms) : 106, 110
. : milestone, 108,
master - mean (107ms) : 105, 109
. : milestone, 107,
section CallTarget+Inlining+NGEN
This PR (6461) - mean (674ms) : 660, 687
. : milestone, 674,
master - mean (677ms) : 664, 689
. : milestone, 677,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6461) - mean (91ms) : 89, 93
. : milestone, 91,
master - mean (91ms) : 89, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (6461) - mean (630ms) : 616, 644
. : milestone, 630,
master - mean (630ms) : 611, 649
. : milestone, 630,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6461) - mean (194ms) : 190, 198
. : milestone, 194,
master - mean (194ms) : 189, 199
. : milestone, 194,
section CallTarget+Inlining+NGEN
This PR (6461) - mean (1,099ms) : 1070, 1128
. : milestone, 1099,
master - mean (1,100ms) : 1078, 1122
. : milestone, 1100,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6461) - mean (278ms) : 272, 285
. : milestone, 278,
master - mean (279ms) : 274, 284
. : milestone, 279,
section CallTarget+Inlining+NGEN
This PR (6461) - mean (869ms) : 835, 903
. : milestone, 869,
master - mean (872ms) : 843, 900
. : milestone, 872,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6461) - mean (267ms) : 263, 271
. : milestone, 267,
master - mean (268ms) : 263, 273
. : milestone, 268,
section CallTarget+Inlining+NGEN
This PR (6461) - mean (850ms) : 815, 885
. : milestone, 850,
master - mean (850ms) : 823, 878
. : milestone, 850,
|
Throughput/Crank Report ⚡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 (6461) (11.209M) : 0, 11209227
master (11.152M) : 0, 11152447
benchmarks/2.9.0 (11.144M) : 0, 11143547
section Automatic
This PR (6461) (7.426M) : 0, 7425806
master (7.354M) : 0, 7353844
benchmarks/2.9.0 (7.982M) : 0, 7981525
section Trace stats
master (7.558M) : 0, 7558154
section Manual
master (11.199M) : 0, 11198717
section Manual + Automatic
This PR (6461) (6.794M) : 0, 6793605
master (6.716M) : 0, 6715949
section DD_TRACE_ENABLED=0
master (10.213M) : 0, 10213385
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6461) (9.654M) : 0, 9653861
benchmarks/2.9.0 (9.621M) : 0, 9621397
section Automatic
This PR (6461) (6.367M) : 0, 6367403
section Manual + Automatic
This PR (6461) (6.013M) : 0, 6013497
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6461) (10.361M) : 0, 10361171
master (10.200M) : 0, 10200189
section Automatic
This PR (6461) (6.886M) : 0, 6885640
master (6.736M) : 0, 6735703
section Trace stats
master (7.380M) : 0, 7380123
section Manual
master (10.350M) : 0, 10350365
section Manual + Automatic
This PR (6461) (6.593M) : 0, 6592644
master (6.235M) : 0, 6234677
section DD_TRACE_ENABLED=0
master (9.495M) : 0, 9495186
|
Benchmarks Report for tracer 🐌Benchmarks for #6461 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.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‑net6.0 | 41.6 KB | 41.83 KB | 228 B | 0.55% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 559μs | 2.59μs | 10.4μs | 0.561 | 0 | 0 | 41.6 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 684μs | 3.93μs | 30.4μs | 0.322 | 0 | 0 | 41.83 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 863μs | 4.48μs | 22.8μs | 8.3 | 2.62 | 0.437 | 53.28 KB |
#6461 | WriteAndFlushEnrichedTraces |
net6.0 | 581μs | 1.53μs | 5.53μs | 0.543 | 0 | 0 | 41.83 KB |
#6461 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 677μs | 3.63μs | 19.2μs | 0.331 | 0 | 0 | 41.83 KB |
#6461 | WriteAndFlushEnrichedTraces |
net472 | 836μs | 3.78μs | 14.6μs | 8.36 | 2.39 | 0.398 | 53.31 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.24μs | 1.32ns | 4.95ns | 0.0144 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.81μs | 2.28ns | 8.82ns | 0.0135 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
net472 | 2.01μs | 1.73ns | 6.69ns | 0.156 | 0.00101 | 0 | 987 B |
#6461 | ExecuteNonQuery |
net6.0 | 1.26μs | 1.11ns | 4.17ns | 0.0145 | 0 | 0 | 1.02 KB |
#6461 | ExecuteNonQuery |
netcoreapp3.1 | 1.78μs | 1.98ns | 7.67ns | 0.0132 | 0 | 0 | 1.02 KB |
#6461 | ExecuteNonQuery |
net472 | 2.13μs | 1.89ns | 6.8ns | 0.157 | 0.00107 | 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.25μs | 0.415ns | 1.61ns | 0.0138 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.6μs | 0.82ns | 2.96ns | 0.0128 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.52μs | 1.14ns | 3.96ns | 0.157 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.32μs | 0.286ns | 0.99ns | 0.0132 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.72μs | 0.778ns | 3.01ns | 0.0137 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.7μs | 1.77ns | 6.37ns | 0.166 | 0 | 0 | 1.05 KB |
#6461 | CallElasticsearch |
net6.0 | 1.25μs | 1.22ns | 4.72ns | 0.0138 | 0 | 0 | 976 B |
#6461 | CallElasticsearch |
netcoreapp3.1 | 1.54μs | 1.44ns | 5.57ns | 0.0131 | 0 | 0 | 976 B |
#6461 | CallElasticsearch |
net472 | 2.62μs | 1.28ns | 4.97ns | 0.157 | 0 | 0 | 995 B |
#6461 | CallElasticsearchAsync |
net6.0 | 1.25μs | 0.291ns | 1.09ns | 0.0131 | 0 | 0 | 952 B |
#6461 | CallElasticsearchAsync |
netcoreapp3.1 | 1.76μs | 7.7ns | 35.3ns | 0.014 | 0 | 0 | 1.02 KB |
#6461 | CallElasticsearchAsync |
net472 | 2.67μs | 1.47ns | 5.52ns | 0.167 | 0 | 0 | 1.05 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.32μs | 0.378ns | 1.41ns | 0.0132 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.69μs | 2.89ns | 11.2ns | 0.0126 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.85μs | 0.561ns | 2.17ns | 0.145 | 0 | 0 | 915 B |
#6461 | ExecuteAsync |
net6.0 | 1.28μs | 0.769ns | 2.98ns | 0.0134 | 0 | 0 | 952 B |
#6461 | ExecuteAsync |
netcoreapp3.1 | 1.62μs | 0.644ns | 2.5ns | 0.013 | 0 | 0 | 952 B |
#6461 | ExecuteAsync |
net472 | 1.77μs | 0.7ns | 2.43ns | 0.145 | 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 | 4.49μs | 1.47ns | 5.51ns | 0.0312 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.32μs | 1.62ns | 6.05ns | 0.0369 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.31μs | 2.41ns | 9.33ns | 0.496 | 0 | 0 | 3.12 KB |
#6461 | SendAsync |
net6.0 | 4.39μs | 1.78ns | 6.91ns | 0.033 | 0 | 0 | 2.31 KB |
#6461 | SendAsync |
netcoreapp3.1 | 5.42μs | 5.24ns | 20.3ns | 0.0377 | 0 | 0 | 2.85 KB |
#6461 | SendAsync |
net472 | 7.38μs | 1.54ns | 5.95ns | 0.494 | 0 | 0 | 3.12 KB |
Benchmarks.Trace.ILoggerBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #6461
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0
1.133
1,644.01
1,450.75
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 | 1.133 | 1,644.01 | 1,450.75 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 1.64μs | 0.686ns | 2.57ns | 0.0227 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.17μs | 1.9ns | 7.1ns | 0.0218 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.78μs | 2.18ns | 8.16ns | 0.249 | 0 | 0 | 1.57 KB |
#6461 | EnrichedLog |
net6.0 | 1.45μs | 0.745ns | 2.58ns | 0.0232 | 0 | 0 | 1.64 KB |
#6461 | EnrichedLog |
netcoreapp3.1 | 2.21μs | 1.42ns | 5.32ns | 0.0219 | 0 | 0 | 1.64 KB |
#6461 | EnrichedLog |
net472 | 2.7μs | 1ns | 3.75ns | 0.249 | 0 | 0 | 1.57 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 | 118μs | 153ns | 591ns | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 122μs | 207ns | 801ns | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 151μs | 206ns | 772ns | 0.673 | 0.224 | 0 | 4.46 KB |
#6461 | EnrichedLog |
net6.0 | 119μs | 108ns | 419ns | 0.0583 | 0 | 0 | 4.28 KB |
#6461 | EnrichedLog |
netcoreapp3.1 | 123μs | 156ns | 582ns | 0 | 0 | 0 | 4.28 KB |
#6461 | EnrichedLog |
net472 | 153μs | 102ns | 395ns | 0.688 | 0.229 | 0 | 4.46 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.04μs | 1.09ns | 4.21ns | 0.0304 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.26μs | 1.1ns | 4.25ns | 0.0298 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.85μs | 1.37ns | 5.31ns | 0.321 | 0 | 0 | 2.02 KB |
#6461 | EnrichedLog |
net6.0 | 3.11μs | 1.1ns | 4.24ns | 0.0299 | 0 | 0 | 2.2 KB |
#6461 | EnrichedLog |
netcoreapp3.1 | 4.22μs | 0.832ns | 3.11ns | 0.0297 | 0 | 0 | 2.2 KB |
#6461 | EnrichedLog |
net472 | 4.9μs | 1.39ns | 5.37ns | 0.321 | 0 | 0 | 2.02 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.44μs | 0.712ns | 2.76ns | 0.0158 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.83μs | 0.892ns | 3.34ns | 0.0156 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.11μs | 1.34ns | 5.17ns | 0.183 | 0 | 0 | 1.16 KB |
#6461 | SendReceive |
net6.0 | 1.34μs | 0.797ns | 3.09ns | 0.016 | 0 | 0 | 1.14 KB |
#6461 | SendReceive |
netcoreapp3.1 | 1.88μs | 1.34ns | 5.19ns | 0.0151 | 0 | 0 | 1.14 KB |
#6461 | SendReceive |
net472 | 2.15μs | 2.81ns | 10.5ns | 0.183 | 0 | 0 | 1.16 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.72μs | 0.53ns | 2.05ns | 0.0218 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.93μs | 2.1ns | 7.27ns | 0.0216 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.28μs | 4.16ns | 16.1ns | 0.322 | 0 | 0 | 2.04 KB |
#6461 | EnrichedLog |
net6.0 | 2.75μs | 1.13ns | 4.39ns | 0.022 | 0 | 0 | 1.6 KB |
#6461 | EnrichedLog |
netcoreapp3.1 | 3.89μs | 2.42ns | 9.04ns | 0.0214 | 0 | 0 | 1.65 KB |
#6461 | EnrichedLog |
net472 | 4.33μs | 2.99ns | 11.2ns | 0.322 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #6461
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1
1.126
654.22
580.86
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 | 1.126 | 654.22 | 580.86 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 406ns | 0.224ns | 0.838ns | 0.00795 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 654ns | 0.336ns | 1.3ns | 0.0075 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 689ns | 0.494ns | 1.91ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 566ns | 0.376ns | 1.46ns | 0.00984 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 723ns | 0.611ns | 2.37ns | 0.00911 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 884ns | 0.963ns | 3.73ns | 0.105 | 0 | 0 | 658 B |
#6461 | StartFinishSpan |
net6.0 | 395ns | 0.268ns | 1.04ns | 0.00806 | 0 | 0 | 576 B |
#6461 | StartFinishSpan |
netcoreapp3.1 | 581ns | 0.746ns | 2.89ns | 0.00784 | 0 | 0 | 576 B |
#6461 | StartFinishSpan |
net472 | 646ns | 0.229ns | 0.887ns | 0.0917 | 0 | 0 | 578 B |
#6461 | StartFinishScope |
net6.0 | 561ns | 0.303ns | 1.17ns | 0.0096 | 0 | 0 | 696 B |
#6461 | StartFinishScope |
netcoreapp3.1 | 736ns | 0.959ns | 3.71ns | 0.00943 | 0 | 0 | 696 B |
#6461 | StartFinishScope |
net472 | 879ns | 0.762ns | 2.95ns | 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 | 672ns | 0.465ns | 1.8ns | 0.00975 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 902ns | 0.54ns | 2.02ns | 0.00961 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.14μs | 0.507ns | 1.96ns | 0.104 | 0 | 0 | 658 B |
#6461 | RunOnMethodBegin |
net6.0 | 666ns | 0.262ns | 1.01ns | 0.00996 | 0 | 0 | 696 B |
#6461 | RunOnMethodBegin |
netcoreapp3.1 | 965ns | 0.501ns | 1.81ns | 0.00925 | 0 | 0 | 696 B |
#6461 | RunOnMethodBegin |
net472 | 1.13μs | 1.08ns | 4.2ns | 0.105 | 0 | 0 | 658 B |
Datadog ReportBranch report: ✅ 0 Failed, 232291 Passed, 2090 Skipped, 18h 57m 51.32s Total Time |
17992fc
to
43a3d3d
Compare
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 doubt we want to vendor in the SRResource.resx
files? 🤔
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 think we do, because it's referenced everywhere, in error messages for instance
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.
The designer file is referenced (as that has the c# code) but I don't think we need the resx
files themselves
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.
Yes you are right, I don't think the resx file is needed at compile time, however it contains the values for all the error messages. I guess this means if there is an error, then there will be an error within the error when trying to get the error message. Maybe it's OK ?
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.
Urgh, you're right, for some reason I thought the designer.cs code included hard-coded versions of the resx. That said, is this actually being used anyway 🤔 IIRC you have to embed the resx file for this to work. Frankly I'd be inclined to do some munging and hardcode it to avoid the bloat.
if there is an error, then there will be an error within the error
Yeah the more important point though is yes, if this happens, Bad Things™ will likely happen, so we need to make sure it's "working" correctly either way, whether that's with hard coding/stripping it out/Or embedding (note that we don't embed any other resx files, I'm not massively inclined to start, personally 😄)
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.
okay, inlining is not too easy to do using our current tooling though, because the callback to apply changes to files only looks at files one by one...
tracer/src/Datadog.Trace/Vendors/Microsoft.OpenApi/Extensions/OpenApiTypeMapper.cs
Outdated
Show resolved
Hide resolved
tracer/src/Datadog.Trace/Vendors/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs
Outdated
Show resolved
Hide resolved
tracer/src/Datadog.Tracer.Native/Generated/generated_calltargets.g.cpp
Outdated
Show resolved
Hide resolved
version: "1.6.22", | ||
downloadUrl: "https://github.com/microsoft/OpenAPI.NET/archive/1.6.22.zip", | ||
pathToSrc: new[] { "OpenAPI.NET-1.6.22", "src", "Microsoft.OpenApi" }, | ||
transform: filePath => RewriteCsFileWithStandardTransform(filePath, originalNamespace: "Microsoft.OpenApi")); |
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.
You should add the additional changes you need to make in here as additional transforms
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.
ooooh this is how it works
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 is a lot of extra code... do we need it all? How much does it increase the binary sizes (especially when multiplied by 4). Do we need it in all TFMs? Can we strip any of it out?
no we probably don't need everything. I'm only going to use it to build the object representing the schema, and then serialize it to json. In Java, it was reimplemented manually. That's an option too, but I wanted to use existing code as much as possible. |
it's relatively hard to strip it by entire files. I did my best, but stripping more would require editing the code to remove references elsewhere, which would be quite a pain (like, there is a visitor referencing every model, and OpenApiDocument has a field for each document type for instance, removing a single Model that we don't use would require editing those two). If it's still too big, I can write the objects and json serialization myself too, but that's risks of bugs && time spent not doing something else. |
Summary of changes
added the code of Microsoft.OpenApi to the tracer, removed/changed the parts that require more recent versions of the language/fwk than we have, and updated generated files.
Reason for change
It's going to be needed for the protobuf instrumentation in #6166, and I'm doing it in a separate PR to limit the size of the diff in the actual change.
Implementation details
@bouwkast ran the vendoring tool to add the files, since it's not working on Mac apparently
Test coverage
Other details