-
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
fix container tagging for Alpine containers #6505
base: master
Are you sure you want to change the base?
Conversation
Datadog ReportBranch report: ❌ 7 Failed (0 Known Flaky), 236107 Passed, 2062 Skipped, 18h 53m 42.81s Total Time ❌ Failed Tests (7)
|
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 (6505) - mean (69ms) : 66, 71
. : milestone, 69,
master - mean (68ms) : 66, 70
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (6505) - mean (979ms) : 955, 1003
. : milestone, 979,
master - mean (977ms) : 958, 996
. : milestone, 977,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6505) - mean (107ms) : 105, 110
. : milestone, 107,
master - mean (107ms) : 104, 110
. : milestone, 107,
section CallTarget+Inlining+NGEN
This PR (6505) - mean (680ms) : 667, 693
. : milestone, 680,
master - mean (679ms) : 662, 695
. : milestone, 679,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6505) - mean (91ms) : 89, 93
. : milestone, 91,
master - mean (91ms) : 88, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (6505) - mean (634ms) : 612, 655
. : milestone, 634,
master - mean (638ms) : 619, 656
. : milestone, 638,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6505) - mean (194ms) : 189, 198
. : milestone, 194,
master - mean (194ms) : 189, 199
. : milestone, 194,
section CallTarget+Inlining+NGEN
This PR (6505) - mean (1,106ms) : 1075, 1137
. : milestone, 1106,
master - mean (1,102ms) : 1068, 1135
. : milestone, 1102,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6505) - mean (279ms) : 274, 284
. : milestone, 279,
master - mean (279ms) : 274, 284
. : milestone, 279,
section CallTarget+Inlining+NGEN
This PR (6505) - mean (872ms) : 849, 896
. : milestone, 872,
master - mean (873ms) : 846, 900
. : milestone, 873,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6505) - mean (267ms) : 264, 270
. : milestone, 267,
master - mean (267ms) : 263, 271
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (6505) - mean (853ms) : 823, 883
. : milestone, 853,
master - mean (850ms) : 814, 886
. : milestone, 850,
|
Benchmarks Report for tracer 🐌Benchmarks for #6505 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 ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 | 1.133 | 1,200.51 | 1,360.07 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.18μs | 0.874ns | 3.27ns | 0.0136 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.56μs | 0.606ns | 2.19ns | 0.0125 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.61μs | 1.05ns | 3.92ns | 0.157 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.2μs | 0.792ns | 2.96ns | 0.0133 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.74μs | 3.69ns | 14.3ns | 0.0138 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.52μs | 1.39ns | 5.37ns | 0.166 | 0 | 0 | 1.05 KB |
#6505 | CallElasticsearch |
net6.0 | 1.26μs | 1.02ns | 3.96ns | 0.0133 | 0 | 0 | 976 B |
#6505 | CallElasticsearch |
netcoreapp3.1 | 1.57μs | 0.961ns | 3.72ns | 0.0127 | 0 | 0 | 976 B |
#6505 | CallElasticsearch |
net472 | 2.41μs | 1.08ns | 4.05ns | 0.158 | 0 | 0 | 995 B |
#6505 | CallElasticsearchAsync |
net6.0 | 1.36μs | 0.765ns | 2.96ns | 0.0131 | 0 | 0 | 952 B |
#6505 | CallElasticsearchAsync |
netcoreapp3.1 | 1.72μs | 0.976ns | 3.78ns | 0.0136 | 0 | 0 | 1.02 KB |
#6505 | CallElasticsearchAsync |
net472 | 2.58μs | 0.84ns | 3.25ns | 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.36μs | 0.73ns | 2.83ns | 0.0132 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.65μs | 0.617ns | 2.31ns | 0.0131 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.79μs | 0.407ns | 1.58ns | 0.145 | 0 | 0 | 915 B |
#6505 | ExecuteAsync |
net6.0 | 1.39μs | 1.22ns | 4.57ns | 0.0133 | 0 | 0 | 952 B |
#6505 | ExecuteAsync |
netcoreapp3.1 | 1.57μs | 0.944ns | 3.66ns | 0.0133 | 0 | 0 | 952 B |
#6505 | ExecuteAsync |
net472 | 1.83μs | 0.393ns | 1.52ns | 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.41μs | 1.84ns | 6.89ns | 0.033 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.31μs | 2.42ns | 9.36ns | 0.0372 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.38μs | 1.37ns | 4.75ns | 0.493 | 0 | 0 | 3.12 KB |
#6505 | SendAsync |
net6.0 | 4.39μs | 1ns | 3.6ns | 0.0325 | 0 | 0 | 2.31 KB |
#6505 | SendAsync |
netcoreapp3.1 | 5.23μs | 1.49ns | 5.58ns | 0.0367 | 0 | 0 | 2.85 KB |
#6505 | SendAsync |
net472 | 7.42μs | 2.01ns | 7.8ns | 0.493 | 0 | 0 | 3.12 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 | 1.54μs | 0.565ns | 2.12ns | 0.0233 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.2μs | 0.881ns | 3.3ns | 0.0221 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.63μs | 1.55ns | 6ns | 0.249 | 0 | 0 | 1.57 KB |
#6505 | EnrichedLog |
net6.0 | 1.47μs | 0.561ns | 2.1ns | 0.0229 | 0 | 0 | 1.64 KB |
#6505 | EnrichedLog |
netcoreapp3.1 | 2.34μs | 1.01ns | 3.77ns | 0.0218 | 0 | 0 | 1.64 KB |
#6505 | EnrichedLog |
net472 | 2.75μs | 1.45ns | 5.41ns | 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 | 117μs | 163ns | 630ns | 0.0587 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 122μs | 246ns | 953ns | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 150μs | 196ns | 760ns | 0.675 | 0.225 | 0 | 4.46 KB |
#6505 | EnrichedLog |
net6.0 | 119μs | 141ns | 548ns | 0.0598 | 0 | 0 | 4.28 KB |
#6505 | EnrichedLog |
netcoreapp3.1 | 124μs | 249ns | 963ns | 0 | 0 | 0 | 4.28 KB |
#6505 | EnrichedLog |
net472 | 153μs | 156ns | 606ns | 0.684 | 0.228 | 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.05μs | 0.956ns | 3.7ns | 0.0304 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.24μs | 1.88ns | 7.29ns | 0.0296 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.94μs | 1.38ns | 5.35ns | 0.321 | 0 | 0 | 2.02 KB |
#6505 | EnrichedLog |
net6.0 | 2.86μs | 0.944ns | 3.66ns | 0.0303 | 0 | 0 | 2.2 KB |
#6505 | EnrichedLog |
netcoreapp3.1 | 4.1μs | 1.46ns | 5.47ns | 0.0286 | 0 | 0 | 2.2 KB |
#6505 | EnrichedLog |
net472 | 4.9μs | 1.23ns | 4.78ns | 0.319 | 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 | 1.22ns | 4.58ns | 0.0158 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.85μs | 1.22ns | 4.72ns | 0.0158 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.09μs | 1.38ns | 4.98ns | 0.183 | 0 | 0 | 1.16 KB |
#6505 | SendReceive |
net6.0 | 1.36μs | 0.525ns | 1.96ns | 0.0162 | 0 | 0 | 1.14 KB |
#6505 | SendReceive |
netcoreapp3.1 | 1.72μs | 0.719ns | 2.79ns | 0.0149 | 0 | 0 | 1.14 KB |
#6505 | SendReceive |
net472 | 2.19μs | 2.29ns | 8.88ns | 0.184 | 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.62μs | 1.11ns | 4.28ns | 0.0224 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 4μs | 9.1ns | 35.3ns | 0.0218 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.26μs | 2.11ns | 8.18ns | 0.324 | 0 | 0 | 2.04 KB |
#6505 | EnrichedLog |
net6.0 | 2.66μs | 0.674ns | 2.61ns | 0.0226 | 0 | 0 | 1.6 KB |
#6505 | EnrichedLog |
netcoreapp3.1 | 4.13μs | 1.21ns | 4.54ns | 0.0208 | 0 | 0 | 1.65 KB |
#6505 | EnrichedLog |
net472 | 4.34μs | 2.22ns | 8.32ns | 0.322 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6505
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.173
392.43
460.29
Faster 🎉 in #6505
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0
1.160
555.80
479.18
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1
1.142
766.80
671.23
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.173 | 392.43 | 460.29 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 1.160 | 555.80 | 479.18 | |
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.142 | 766.80 | 671.23 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 393ns | 0.297ns | 1.15ns | 0.00797 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 557ns | 0.325ns | 1.26ns | 0.00782 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 629ns | 0.357ns | 1.38ns | 0.0915 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 556ns | 0.32ns | 1.24ns | 0.00976 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 767ns | 0.461ns | 1.79ns | 0.00962 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 873ns | 0.621ns | 2.41ns | 0.104 | 0 | 0 | 658 B |
#6505 | StartFinishSpan |
net6.0 | 460ns | 0.339ns | 1.31ns | 0.00813 | 0 | 0 | 576 B |
#6505 | StartFinishSpan |
netcoreapp3.1 | 599ns | 0.604ns | 2.34ns | 0.00794 | 0 | 0 | 576 B |
#6505 | StartFinishSpan |
net472 | 663ns | 0.395ns | 1.53ns | 0.0917 | 0 | 0 | 578 B |
#6505 | StartFinishScope |
net6.0 | 480ns | 0.261ns | 1.01ns | 0.00984 | 0 | 0 | 696 B |
#6505 | StartFinishScope |
netcoreapp3.1 | 671ns | 0.594ns | 2.3ns | 0.00955 | 0 | 0 | 696 B |
#6505 | StartFinishScope |
net472 | 862ns | 0.856ns | 3.32ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #6505
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1
1.140
966.76
847.81
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
1.120
669.29
597.84
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 | 1.140 | 966.76 | 847.81 | |
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 | 1.120 | 669.29 | 597.84 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 669ns | 0.258ns | 0.966ns | 0.00972 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 966ns | 0.75ns | 2.91ns | 0.00924 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.13μs | 0.458ns | 1.78ns | 0.104 | 0 | 0 | 658 B |
#6505 | RunOnMethodBegin |
net6.0 | 598ns | 0.313ns | 1.21ns | 0.00994 | 0 | 0 | 696 B |
#6505 | RunOnMethodBegin |
netcoreapp3.1 | 848ns | 0.516ns | 2ns | 0.00898 | 0 | 0 | 696 B |
#6505 | RunOnMethodBegin |
net472 | 1.09μs | 0.749ns | 2.9ns | 0.104 | 0 | 0 | 658 B |
@@ -154,7 +154,7 @@ internal static bool TryGetInode(string path, out long result) | |||
|
|||
try | |||
{ | |||
var statCommand = ProcessHelpers.RunCommand(new ProcessHelpers.Command("stat", $"--printf=%i {path}")); | |||
var statCommand = ProcessHelpers.RunCommand(new ProcessHelpers.Command("stat", $"-c %i {path}")); |
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.
We should probably add a unit tests for TryGetInode()
to ContainerMetadataTests.cs
. This test should fail on Alpine before this change and pass after the change.
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.
And in other Linux distros (not Alpine), it should pass before and after this change (confirming there is not regression).
Summary of changes
Swap out
--printf=%i
for-c %i
because in alpine images--printf=%i
is invalid, which prevents container tagging from working when using alpine based images.Example:
returns:
stat: unrecognized option: printf=%i
.This fix swaps it out for the
-c %i
option which exists in alpine containers.Reason for change
Implementation details
Test coverage
Other details