-
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
[CI Visibility] Improve Git commands execution #6545
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 239431 Passed, 1981 Skipped, 18h 33m 5.79s Total Time |
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 (6545) - mean (70ms) : 63, 76
. : milestone, 70,
master - mean (68ms) : 66, 71
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (6545) - mean (978ms) : 958, 999
. : milestone, 978,
master - mean (975ms) : 946, 1003
. : milestone, 975,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6545) - mean (107ms) : 105, 109
. : milestone, 107,
master - mean (107ms) : 105, 110
. : milestone, 107,
section CallTarget+Inlining+NGEN
This PR (6545) - mean (672ms) : 658, 687
. : milestone, 672,
master - mean (677ms) : 661, 694
. : milestone, 677,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6545) - mean (91ms) : 89, 94
. : milestone, 91,
master - mean (90ms) : 89, 92
. : milestone, 90,
section CallTarget+Inlining+NGEN
This PR (6545) - mean (629ms) : 614, 644
. : milestone, 629,
master - mean (630ms) : 615, 646
. : milestone, 630,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6545) - mean (194ms) : 189, 198
. : milestone, 194,
master - mean (194ms) : 189, 199
. : milestone, 194,
section CallTarget+Inlining+NGEN
This PR (6545) - mean (1,098ms) : 1066, 1129
. : milestone, 1098,
master - mean (1,104ms) : 1073, 1135
. : milestone, 1104,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6545) - mean (278ms) : 274, 282
. : milestone, 278,
master - mean (280ms) : 273, 286
. : milestone, 280,
section CallTarget+Inlining+NGEN
This PR (6545) - mean (867ms) : 842, 891
. : milestone, 867,
master - mean (869ms) : 842, 896
. : milestone, 869,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6545) - mean (267ms) : 263, 271
. : milestone, 267,
master - mean (267ms) : 262, 271
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (6545) - mean (850ms) : 821, 879
. : milestone, 850,
master - mean (853ms) : 825, 880
. : milestone, 853,
|
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.
Nice work! 🤞 thanks!
Benchmarks Report for tracer 🐌Benchmarks for #6545 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 - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 1.219 | 465.70 | 567.69 | |
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472 | 1.193 | 816.48 | 974.12 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 396ns | 0.259ns | 1ns | 0.00804 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 621ns | 1.21ns | 4.7ns | 0.00773 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 712ns | 0.333ns | 1.29ns | 0.0916 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 466ns | 0.212ns | 0.766ns | 0.00978 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 718ns | 2.25ns | 8.73ns | 0.0094 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 817ns | 0.954ns | 3.7ns | 0.104 | 0 | 0 | 658 B |
#6545 | StartFinishSpan |
net6.0 | 398ns | 0.145ns | 0.563ns | 0.008 | 0 | 0 | 576 B |
#6545 | StartFinishSpan |
netcoreapp3.1 | 628ns | 0.532ns | 1.84ns | 0.00768 | 0 | 0 | 576 B |
#6545 | StartFinishSpan |
net472 | 650ns | 0.451ns | 1.75ns | 0.0915 | 0 | 0 | 578 B |
#6545 | StartFinishScope |
net6.0 | 568ns | 0.253ns | 0.981ns | 0.00962 | 0 | 0 | 696 B |
#6545 | StartFinishScope |
netcoreapp3.1 | 745ns | 0.947ns | 3.67ns | 0.00922 | 0 | 0 | 696 B |
#6545 | StartFinishScope |
net472 | 974ns | 0.589ns | 2.28ns | 0.105 | 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 | 609ns | 0.354ns | 1.37ns | 0.00974 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 970ns | 0.624ns | 2.34ns | 0.00962 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.12μs | 0.636ns | 2.46ns | 0.104 | 0 | 0 | 658 B |
#6545 | RunOnMethodBegin |
net6.0 | 656ns | 0.369ns | 1.38ns | 0.0097 | 0 | 0 | 696 B |
#6545 | RunOnMethodBegin |
netcoreapp3.1 | 935ns | 0.556ns | 2.15ns | 0.00894 | 0 | 0 | 696 B |
#6545 | RunOnMethodBegin |
net472 | 1.16μs | 0.82ns | 3.18ns | 0.104 | 0 | 0 | 658 B |
Summary of changes
This PR changes the way CI Visiblity execute the Git commands, running the commands synchronous (CI Visibility was the only one using the async version of the ProcessHelper), also it adds support for command timeout, so we avoid hanging the process until a git command finishes.
Reason for change
I detected some deadlocks while executing git commands in Alpine Arm64.
Implementation details
Removing some async code and refactor the IntelligentTestRunnerClient class.
Test coverage
The same test should pass with no change of behaviour. The Alpine issue should be fixed with this PR.
Other details
Ticket: SDTEST-1422