-
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
Parallelize unit tests #6483
Parallelize unit tests #6483
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 229404 Passed, 2075 Skipped, 18h 28m 6.19s 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 (6483) - mean (69ms) : 65, 72
. : milestone, 69,
master - mean (69ms) : 65, 72
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6483) - mean (976ms) : 951, 1001
. : milestone, 976,
master - mean (977ms) : 955, 1000
. : milestone, 977,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6483) - mean (107ms) : 105, 109
. : milestone, 107,
master - mean (107ms) : 105, 109
. : milestone, 107,
section CallTarget+Inlining+NGEN
This PR (6483) - mean (674ms) : 659, 689
. : milestone, 674,
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 (6483) - mean (91ms) : 89, 93
. : milestone, 91,
master - mean (91ms) : 89, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (6483) - mean (632ms) : 613, 651
. : milestone, 632,
master - mean (634ms) : 614, 654
. : milestone, 634,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6483) - mean (194ms) : 190, 199
. : milestone, 194,
master - mean (193ms) : 189, 197
. : milestone, 193,
section CallTarget+Inlining+NGEN
This PR (6483) - mean (1,098ms) : 1066, 1131
. : milestone, 1098,
master - mean (1,099ms) : 1070, 1129
. : milestone, 1099,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6483) - mean (278ms) : 274, 282
. : milestone, 278,
master - mean (278ms) : 272, 283
. : milestone, 278,
section CallTarget+Inlining+NGEN
This PR (6483) - mean (870ms) : 838, 902
. : milestone, 870,
master - mean (871ms) : 844, 897
. : milestone, 871,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6483) - mean (267ms) : 263, 270
. : milestone, 267,
master - mean (266ms) : 262, 270
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (6483) - mean (850ms) : 811, 889
. : milestone, 850,
master - mean (855ms) : 825, 885
. : milestone, 855,
|
Benchmarks Report for tracer 🐌Benchmarks for #6483 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.117 | 482.49 | 538.78 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 399ns | 0.25ns | 0.967ns | 0.00805 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 597ns | 0.33ns | 1.28ns | 0.00752 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 656ns | 0.281ns | 1.05ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 483ns | 0.227ns | 0.849ns | 0.00965 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 676ns | 0.441ns | 1.71ns | 0.00949 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 872ns | 0.728ns | 2.82ns | 0.104 | 0 | 0 | 658 B |
#6483 | StartFinishSpan |
net6.0 | 408ns | 0.142ns | 0.55ns | 0.00805 | 0 | 0 | 576 B |
#6483 | StartFinishSpan |
netcoreapp3.1 | 558ns | 0.474ns | 1.84ns | 0.00757 | 0 | 0 | 576 B |
#6483 | StartFinishSpan |
net472 | 683ns | 0.19ns | 0.686ns | 0.0918 | 0 | 0 | 578 B |
#6483 | StartFinishScope |
net6.0 | 539ns | 0.155ns | 0.557ns | 0.00972 | 0 | 0 | 696 B |
#6483 | StartFinishScope |
netcoreapp3.1 | 672ns | 0.316ns | 1.18ns | 0.0096 | 0 | 0 | 696 B |
#6483 | StartFinishScope |
net472 | 911ns | 0.334ns | 1.29ns | 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 | 634ns | 0.299ns | 1.12ns | 0.00988 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 906ns | 0.326ns | 1.26ns | 0.00898 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.07μs | 0.503ns | 1.95ns | 0.104 | 0 | 0 | 658 B |
#6483 | RunOnMethodBegin |
net6.0 | 696ns | 0.415ns | 1.61ns | 0.00977 | 0 | 0 | 696 B |
#6483 | RunOnMethodBegin |
netcoreapp3.1 | 987ns | 0.716ns | 2.68ns | 0.00943 | 0 | 0 | 696 B |
#6483 | RunOnMethodBegin |
net472 | 1.08μs | 0.601ns | 2.33ns | 0.105 | 0 | 0 | 658 B |
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'm interested
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.
Dam look at that time difference!
Summary of changes
Parallelize the unit test runs in CI
Reason for change
As we test more frameworks, the runs take longer. We can easily parallize by TFM (e.g. we allow running a specific TFM locally), so this overall speeds up the unit test execution. As we (attempt) to improve the speed of other stages, this allows gaining confidence earlier. Additionally, in the case of flake, re-running a stage takes less time when each TFM is parallelized.
Implementation details
Generate the matricies, use them in CI
Test coverage
Did a test run, looks OK to me
Other details
Reduces the wall time from this:
to this: