Skip to content
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

chore: unify jest maxWorkers usage on CI and turn off code coverage #27680

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Apr 25, 2023

Previous Behavior

  • v0,v8 have different jest setups in terms of leveraging threads on CI
  • some projects run code-coverage in CI which slows down test execution by 10%

New Behavior

  • v0,v8 uses unified maxWorkers setup on CI, (based on measurements it looks like ideal setup for our current CI resources )
    • 💡 what about v9?
      • in my initial experiments this was also enabled for v9. looks like until all perf improvements will land this will cause CI to run over 1 hour - so not part of this PR
  • code-coverage has been disabled

Speed metrics:

Using code-coverage (react-northstar - up to 10% slowdown)

Run type time command
current 382 s gulp test --config ./jest.config.js --coverage --maxWorkers=2 --no-cache
without codecov 340 s gulp test --config ./jest.config.js --maxWorkers=2

Related Issue(s)

@github-actions github-actions bot added this to the April Project Cycle Q2 2023 milestone Apr 25, 2023
@Hotell Hotell changed the title Hotell/build/faster ci/unified jest max workers setup chore: unify jest maxWorkers usage on CI Apr 25, 2023
@Hotell Hotell changed the title chore: unify jest maxWorkers usage on CI chore: unify jest maxWorkers usage on CI and turn off code coverage Apr 25, 2023
@size-auditor
Copy link

size-auditor bot commented Apr 25, 2023

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: f0b05741d812ad90c52754b0b4035d5554cf2aa0 (build)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 25, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 053eb56:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam
Copy link
Collaborator

fabricteam commented Apr 25, 2023

Perf Analysis (@fluentui/react-components)

Scenario Render type Master Ticks PR Ticks Iterations Status
FluentProviderWithTheme virtual-rerender 39 31 10 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 625 643 5000
Button mount 294 313 5000
Field mount 1147 1169 5000
FluentProvider mount 728 711 5000
FluentProviderWithTheme mount 87 83 10
FluentProviderWithTheme virtual-rerender 39 31 10 Possible regression
FluentProviderWithTheme virtual-rerender-with-unmount 78 78 10
MakeStyles mount 862 887 50000
Persona mount 1758 1688 5000
SpinButton mount 1403 1393 5000
SwatchPicker mount 1657 1660 5000

@fabricteam
Copy link
Collaborator

fabricteam commented Apr 25, 2023

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
ButtonMinimalPerf.default 98 85 1.15:1
AttachmentSlotsPerf.default 647 584 1.11:1
ListWith60ListItems.default 384 357 1.08:1
BoxMinimalPerf.default 201 188 1.07:1
LabelMinimalPerf.default 226 211 1.07:1
ListMinimalPerf.default 329 307 1.07:1
SkeletonMinimalPerf.default 213 199 1.07:1
AvatarMinimalPerf.default 119 112 1.06:1
ItemLayoutMinimalPerf.default 734 691 1.06:1
ListNestedPerf.default 334 314 1.06:1
LoaderMinimalPerf.default 202 191 1.06:1
ChatDuplicateMessagesPerf.default 155 148 1.05:1
GridMinimalPerf.default 193 184 1.05:1
ProviderMergeThemesPerf.default 661 631 1.05:1
AnimationMinimalPerf.default 311 299 1.04:1
VideoMinimalPerf.default 435 419 1.04:1
ChatMinimalPerf.default 443 430 1.03:1
RadioGroupMinimalPerf.default 267 259 1.03:1
ReactionMinimalPerf.default 215 209 1.03:1
TooltipMinimalPerf.default 1290 1249 1.03:1
DialogMinimalPerf.default 453 446 1.02:1
DividerMinimalPerf.default 213 208 1.02:1
DropdownMinimalPerf.default 1442 1411 1.02:1
ImageMinimalPerf.default 228 223 1.02:1
MenuButtonMinimalPerf.default 964 943 1.02:1
CustomToolbarPrototype.default 1475 1446 1.02:1
TreeMinimalPerf.default 502 492 1.02:1
ButtonSlotsPerf.default 311 309 1.01:1
EmbedMinimalPerf.default 1868 1843 1.01:1
FlexMinimalPerf.default 155 153 1.01:1
FormMinimalPerf.default 218 215 1.01:1
SplitButtonMinimalPerf.default 2303 2287 1.01:1
TableManyItemsPerf.default 1121 1107 1.01:1
TableMinimalPerf.default 237 234 1.01:1
AccordionMinimalPerf.default 86 86 1:1
HeaderMinimalPerf.default 203 203 1:1
RefMinimalPerf.default 109 109 1:1
SegmentMinimalPerf.default 193 193 1:1
AlertMinimalPerf.default 162 163 0.99:1
AttachmentMinimalPerf.default 81 82 0.99:1
CardMinimalPerf.default 313 315 0.99:1
CarouselMinimalPerf.default 263 267 0.99:1
CheckboxMinimalPerf.default 1142 1149 0.99:1
HeaderSlotsPerf.default 480 484 0.99:1
InputMinimalPerf.default 557 560 0.99:1
LayoutMinimalPerf.default 206 208 0.99:1
MenuMinimalPerf.default 497 502 0.99:1
SliderMinimalPerf.default 729 738 0.99:1
ToolbarMinimalPerf.default 544 551 0.99:1
TreeWith60ListItems.default 89 90 0.99:1
ButtonOverridesMissPerf.default 646 662 0.98:1
DatepickerMinimalPerf.default 3573 3629 0.98:1
IconMinimalPerf.default 392 398 0.98:1
TextMinimalPerf.default 195 198 0.98:1
DropdownManyItemsPerf.default 384 394 0.97:1
PopupMinimalPerf.default 348 358 0.97:1
ChatWithPopoverPerf.default 198 207 0.96:1
ListCommonPerf.default 384 399 0.96:1
ProviderMinimalPerf.default 198 207 0.96:1
TextAreaMinimalPerf.default 280 295 0.95:1
RosterPerf.default 1568 1678 0.93:1
StatusMinimalPerf.default 384 413 0.93:1
PortalMinimalPerf.default 81 88 0.92:1

@fabricteam
Copy link
Collaborator

fabricteam commented Apr 25, 2023

📊 Bundle size report

✅ No changes found

@fabricteam
Copy link
Collaborator

fabricteam commented Apr 25, 2023

🕵 FluentUI-v0 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Apr 25, 2023

🕵 fluentuiv9 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Apr 25, 2023

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 619 641 5000
Breadcrumb mount 1679 1654 1000
Checkbox mount 1711 1710 5000
CheckboxBase mount 1493 1516 5000
ChoiceGroup mount 2980 2965 5000
ComboBox mount 682 679 1000
CommandBar mount 6536 6497 1000
ContextualMenu mount 11499 11635 1000
DefaultButton mount 794 781 5000
DetailsRow mount 2217 2206 5000
DetailsRowFast mount 2212 2262 5000
DetailsRowNoStyles mount 2088 2096 5000
Dialog mount 2880 2730 1000
DocumentCardTitle mount 222 231 1000
Dropdown mount 1993 1995 5000
FocusTrapZone mount 1158 1144 5000
FocusZone mount 1095 1059 5000
GroupedList mount 42181 42350 2
GroupedList virtual-rerender 20276 20259 2
GroupedList virtual-rerender-with-unmount 51375 51580 2
GroupedListV2 mount 229 226 2
GroupedListV2 virtual-rerender 205 216 2
GroupedListV2 virtual-rerender-with-unmount 229 230 2
IconButton mount 1099 1134 5000
Label mount 343 356 5000
Layer mount 2765 2766 5000
Link mount 399 405 5000
MenuButton mount 971 983 5000
MessageBar mount 21193 21200 5000
Nav mount 2030 2042 1000
OverflowSet mount 793 789 5000
Panel mount 1913 1851 1000
Persona mount 764 741 1000
Pivot mount 888 897 1000
PrimaryButton mount 918 931 5000
Rating mount 4637 4637 5000
SearchBox mount 942 920 5000
Shimmer mount 1921 1928 5000
Slider mount 1329 1314 5000
SpinButton mount 2967 2986 5000
Spinner mount 399 398 5000
SplitButton mount 1861 1886 5000
Stack mount 416 414 5000
StackWithIntrinsicChildren mount 885 878 5000
StackWithTextChildren mount 2735 2754 5000
SwatchColorPicker mount 6392 6424 5000
TagPicker mount 1460 1477 5000
Text mount 394 402 5000
TextField mount 935 908 5000
ThemeProvider mount 849 848 5000
ThemeProvider virtual-rerender 579 586 5000
ThemeProvider virtual-rerender-with-unmount 1289 1296 5000
Toggle mount 623 620 5000
buttonNative mount 194 195 5000

@Hotell Hotell mentioned this pull request Apr 25, 2023
9 tasks
jest.preset.js Outdated Show resolved Hide resolved
@Hotell Hotell force-pushed the hotell/build/faster-ci/unified-jest-max-workers-setup branch from ef34fd2 to b9e6e23 Compare April 27, 2023 12:22
@Hotell Hotell marked this pull request as ready for review April 27, 2023 15:01
@Hotell Hotell requested review from a team as code owners April 27, 2023 15:01
@tudorpopams tudorpopams self-requested a review May 2, 2023 12:23
@Hotell Hotell force-pushed the hotell/build/faster-ci/unified-jest-max-workers-setup branch from 660ee7d to 053eb56 Compare May 4, 2023 11:32

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…m v8,v0
@Hotell Hotell force-pushed the hotell/build/faster-ci/unified-jest-max-workers-setup branch from 053eb56 to a7ff161 Compare July 22, 2024 08:49
@github-actions github-actions bot removed this from the May Project Cycle Q2 2023 milestone Jul 22, 2024
@github-actions github-actions bot added this to the July Project Cycle Q3 2024 milestone Jul 22, 2024
@fabricteam
Copy link
Collaborator

fabricteam commented Jul 22, 2024

🕵 fluentui-web-components-v3 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 22, 2024

🕵 fluentuiv8 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 22, 2024

🕵 FluentUIV0 No visual regressions between this PR and main

@Hotell Hotell force-pushed the hotell/build/faster-ci/unified-jest-max-workers-setup branch from a7ff161 to 83a12b2 Compare July 22, 2024 10:03
@Hotell Hotell enabled auto-merge (squash) July 22, 2024 10:32
@Hotell Hotell added Area: Testing Fluent UI react-northstar (v0) Work related to Fluent UI V0 Fluent UI react (v8) Issues about @fluentui/react (v8) CI labels Jul 22, 2024
@Hotell Hotell merged commit 0c3c4ac into microsoft:master Jul 22, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Testing CI Fluent UI react (v8) Issues about @fluentui/react (v8) Fluent UI react-northstar (v0) Work related to Fluent UI V0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants