Fix build in gitlab#2666
Conversation
andrewlock
left a comment
There was a problem hiding this comment.
I wonder, could/should we set this via an env var? We could set it to false in GitLab (where taking the perf hit isn't a big deal), and it would be enabled by default in other envs (azdo/GH/local)?
Good point, let me do another try at this PR. |
This comment has been minimized.
This comment has been minimized.
zacharycmontoya
left a comment
There was a problem hiding this comment.
LGTM especially only disabling the flag in GitLab
c6389bc to
419323f
Compare
This comment has been minimized.
This comment has been minimized.
Benchmarks Report 🐌Benchmarks for #2666 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.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‑netcoreapp3.1 | 1.127 | 2,027.89 | 1,798.81 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net472 | 2.84μs | 16.5ns | 137ns | 0.124 | 0 | 0 | 802 B |
| master | CallElasticsearch |
netcoreapp3.1 | 1.65μs | 7.68ns | 28.7ns | 0.0108 | 0 | 0 | 792 B |
| master | CallElasticsearchAsync |
net472 | 3.07μs | 19.3ns | 191ns | 0.147 | 0 | 0 | 939 B |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.03μs | 5.68ns | 19.7ns | 0.0122 | 0 | 0 | 912 B |
| #2666 | CallElasticsearch |
net472 | 2.87μs | 16.5ns | 138ns | 0.125 | 0 | 0 | 802 B |
| #2666 | CallElasticsearch |
netcoreapp3.1 | 1.69μs | 9.4ns | 61.6ns | 0.0109 | 0 | 0 | 792 B |
| #2666 | CallElasticsearchAsync |
net472 | 2.89μs | 13.6ns | 52.8ns | 0.149 | 0 | 0 | 939 B |
| #2666 | CallElasticsearchAsync |
netcoreapp3.1 | 1.8μs | 5.31ns | 19.1ns | 0.0128 | 0 | 0 | 912 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 |
net472 | 3.09μs | 17.1ns | 98.1ns | 0.165 | 0 | 0 | 1.06 KB |
| master | ExecuteAsync |
netcoreapp3.1 | 2.04μs | 11.3ns | 70.8ns | 0.0141 | 0 | 0 | 1.03 KB |
| #2666 | ExecuteAsync |
net472 | 3.39μs | 18.6ns | 104ns | 0.167 | 0 | 0 | 1.06 KB |
| #2666 | ExecuteAsync |
netcoreapp3.1 | 2.09μs | 9.75ns | 37.8ns | 0.014 | 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.86μs | 38.2ns | 238ns | 0.356 | 0 | 0 | 2.28 KB |
| master | SendAsync |
netcoreapp3.1 | 4.8μs | 23.3ns | 96.2ns | 0.0298 | 0 | 0 | 2.21 KB |
| #2666 | SendAsync |
net472 | 6.87μs | 33.3ns | 133ns | 0.362 | 0 | 0 | 2.28 KB |
| #2666 | SendAsync |
netcoreapp3.1 | 4.7μs | 22ns | 103ns | 0.0307 | 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.42μs | 18.8ns | 147ns | 0.226 | 0 | 0 | 1.45 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.25μs | 16ns | 80.1ns | 0.021 | 0 | 0 | 1.53 KB |
| #2666 | EnrichedLog |
net472 | 3.37μs | 18.2ns | 94.4ns | 0.227 | 0 | 0 | 1.45 KB |
| #2666 | EnrichedLog |
netcoreapp3.1 | 3.1μs | 16.5ns | 88.6ns | 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 | 296μs | 1.61μs | 9.53μs | 0.452 | 0.151 | 0 | 4.33 KB |
| master | EnrichedLog |
netcoreapp3.1 | 231μs | 1.11μs | 4.44μs | 0 | 0 | 0 | 4.21 KB |
| #2666 | EnrichedLog |
net472 | 316μs | 2.94μs | 29.4μs | 0.438 | 0.146 | 0 | 4.33 KB |
| #2666 | EnrichedLog |
netcoreapp3.1 | 238μs | 1.28μs | 6.67μs | 0 | 0 | 0 | 4.21 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 |
net472 | 7.91μs | 42.1ns | 245ns | 0.506 | 0 | 0 | 3.23 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.55μs | 34.9ns | 181ns | 0.0501 | 0 | 0 | 3.6 KB |
| #2666 | EnrichedLog |
net472 | 7.54μs | 38.5ns | 185ns | 0.506 | 0 | 0 | 3.23 KB |
| #2666 | EnrichedLog |
netcoreapp3.1 | 6.52μs | 32.8ns | 157ns | 0.0481 | 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.29μs | 9.68ns | 33.5ns | 0.16 | 0.00112 | 0 | 1.01 KB |
| master | SendReceive |
netcoreapp3.1 | 2.19μs | 8.2ns | 31.8ns | 0.0142 | 0 | 0 | 1.01 KB |
| #2666 | SendReceive |
net472 | 2.34μs | 11.7ns | 51.1ns | 0.16 | 0.00112 | 0 | 1.01 KB |
| #2666 | SendReceive |
netcoreapp3.1 | 1.98μs | 7.36ns | 28.5ns | 0.0135 | 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μs | 30.5ns | 136ns | 0.29 | 0 | 0 | 1.87 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.11μs | 19.3ns | 72.1ns | 0.0202 | 0 | 0 | 1.49 KB |
| #2666 | EnrichedLog |
net472 | 5.94μs | 23.8ns | 89.2ns | 0.291 | 0 | 0 | 1.87 KB |
| #2666 | EnrichedLog |
netcoreapp3.1 | 5.11μs | 24.6ns | 95.2ns | 0.0211 | 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 | 909ns | 5.08ns | 33.3ns | 0.0719 | 0 | 0 | 457 B |
| master | StartFinishSpan |
netcoreapp3.1 | 915ns | 4.96ns | 27.6ns | 0.00618 | 0 | 0 | 456 B |
| master | StartFinishScope |
net472 | 1.08μs | 2.65ns | 9.55ns | 0.0842 | 0 | 0 | 538 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.04μs | 5.77ns | 36ns | 0.008 | 0 | 0 | 576 B |
| #2666 | StartFinishSpan |
net472 | 894ns | 4.85ns | 26.1ns | 0.0718 | 0 | 0 | 457 B |
| #2666 | StartFinishSpan |
netcoreapp3.1 | 914ns | 5.05ns | 32ns | 0.00605 | 0 | 0 | 456 B |
| #2666 | StartFinishScope |
net472 | 1.09μs | 4.7ns | 18.2ns | 0.0844 | 0 | 0 | 538 B |
| #2666 | StartFinishScope |
netcoreapp3.1 | 1.02μs | 4.17ns | 16.1ns | 0.00784 | 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.1ns | 23.6ns | 0.0844 | 0 | 0 | 538 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.14μs | 2.47ns | 8.9ns | 0.00801 | 0 | 0 | 576 B |
| #2666 | RunOnMethodBegin |
net472 | 1.27μs | 4.94ns | 18.5ns | 0.0841 | 0 | 0 | 538 B |
| #2666 | RunOnMethodBegin |
netcoreapp3.1 | 1.19μs | 6.76ns | 47.8ns | 0.00794 | 0 | 0 | 576 B |
83f1063 to
6f16f58
Compare
Code Coverage Report 📊✔️ Merging #2666 into master will not change line coverage
View the full report for further details: Datadog.Trace Breakdown ✔️
The following classes have significant coverage changes.
View the full reports for further details: |
Summary of changes
Reason for change
Currently in gitlab, building native code (Tracer and Native loader as of today) may crash with the following error message:
One explanation of the problem .
Implementation details
Just set to false the
MultiProcessor Compilationoption when running on Gitlab by setting the environment variableENABLE_MULTIPROCESSOR_COMPILATIONtofalse. By default, it's set totrueTest coverage
Other details
This will slow down the build of native libraries.