-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Stress test/new tests #24936
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
Stress test/new tests #24936
Conversation
|
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 b21cfbe:
|
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 42acccd4445b42c806f957de00e5f2567589279f (build) |
74c1ee3 to
abe4d04
Compare
Adds tests cases for - mounting - injecting styles - adding lots of nodes - removing all nodes - re-rendering the entire page for Fluent V8, V9 and Web Components. Introduces the concept of "renderers" that easily allow different components to be slotting into tests with just a query parameter. Moves RandomTree code to scripts to handle a ts-node compilation issue. This isn't ideal but it doesn't seem worth spending lots of time figuring the proper issue out right now. Similarly, some of the randomization code has been moved around in scripts because ts-node was having difficulty importing it.
Adds a "target size" option to RandomTree that, when set, builds a tree to a specific size. Tweaks the default fixture parameters based on manual testing. Fixtures essentially double in size for each t-shirt size. Reduces the default number of Tachometer samples from 25 to 10. In some testing this still gives statistically significant results for all default sizes while making tests take significantly less time to run.
This feature was removed in favor of query params.
Fix inaccuracies, document new features.
adab364 to
0a2bb73
Compare
0a2bb73 to
a08591f
Compare
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1316 | 1342 | 5000 | |
| Button | mount | 930 | 953 | 5000 | |
| FluentProvider | mount | 1584 | 1589 | 5000 | |
| FluentProviderWithTheme | mount | 633 | 635 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 595 | 598 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 635 | 609 | 10 | |
| MakeStyles | mount | 1937 | 1892 | 50000 | |
| SpinButton | mount | 2607 | 2533 | 5000 |
Perf Analysis (
|
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| ButtonMinimalPerf.default | 175 | 157 | 1.11:1 |
| AlertMinimalPerf.default | 265 | 242 | 1.1:1 |
| VideoMinimalPerf.default | 741 | 680 | 1.09:1 |
| ButtonSlotsPerf.default | 532 | 492 | 1.08:1 |
| ChatDuplicateMessagesPerf.default | 261 | 242 | 1.08:1 |
| IconMinimalPerf.default | 651 | 609 | 1.07:1 |
| RadioGroupMinimalPerf.default | 439 | 416 | 1.06:1 |
| AttachmentSlotsPerf.default | 1100 | 1048 | 1.05:1 |
| LabelMinimalPerf.default | 374 | 357 | 1.05:1 |
| FlexMinimalPerf.default | 275 | 265 | 1.04:1 |
| GridMinimalPerf.default | 329 | 317 | 1.04:1 |
| ReactionMinimalPerf.default | 366 | 352 | 1.04:1 |
| TextMinimalPerf.default | 340 | 326 | 1.04:1 |
| DropdownManyItemsPerf.default | 644 | 628 | 1.03:1 |
| HeaderMinimalPerf.default | 349 | 339 | 1.03:1 |
| HeaderSlotsPerf.default | 753 | 732 | 1.03:1 |
| ListNestedPerf.default | 551 | 535 | 1.03:1 |
| SegmentMinimalPerf.default | 343 | 334 | 1.03:1 |
| SkeletonMinimalPerf.default | 328 | 319 | 1.03:1 |
| AccordionMinimalPerf.default | 142 | 139 | 1.02:1 |
| AttachmentMinimalPerf.default | 143 | 140 | 1.02:1 |
| BoxMinimalPerf.default | 336 | 331 | 1.02:1 |
| LayoutMinimalPerf.default | 353 | 345 | 1.02:1 |
| MenuMinimalPerf.default | 832 | 815 | 1.02:1 |
| SliderMinimalPerf.default | 1600 | 1572 | 1.02:1 |
| StatusMinimalPerf.default | 667 | 652 | 1.02:1 |
| TreeMinimalPerf.default | 804 | 789 | 1.02:1 |
| CarouselMinimalPerf.default | 443 | 439 | 1.01:1 |
| DatepickerMinimalPerf.default | 5717 | 5658 | 1.01:1 |
| DialogMinimalPerf.default | 759 | 754 | 1.01:1 |
| DividerMinimalPerf.default | 341 | 339 | 1.01:1 |
| FormMinimalPerf.default | 363 | 360 | 1.01:1 |
| ImageMinimalPerf.default | 375 | 373 | 1.01:1 |
| InputMinimalPerf.default | 1114 | 1104 | 1.01:1 |
| PopupMinimalPerf.default | 620 | 614 | 1.01:1 |
| ProviderMergeThemesPerf.default | 1270 | 1254 | 1.01:1 |
| TableMinimalPerf.default | 394 | 391 | 1.01:1 |
| AnimationMinimalPerf.default | 520 | 522 | 1:1 |
| AvatarMinimalPerf.default | 186 | 186 | 1:1 |
| CardMinimalPerf.default | 520 | 520 | 1:1 |
| ChatMinimalPerf.default | 703 | 700 | 1:1 |
| DropdownMinimalPerf.default | 2663 | 2668 | 1:1 |
| EmbedMinimalPerf.default | 3633 | 3639 | 1:1 |
| ListMinimalPerf.default | 496 | 496 | 1:1 |
| RosterPerf.default | 2118 | 2117 | 1:1 |
| ProviderMinimalPerf.default | 401 | 401 | 1:1 |
| RefMinimalPerf.default | 216 | 216 | 1:1 |
| SplitButtonMinimalPerf.default | 4341 | 4333 | 1:1 |
| TableManyItemsPerf.default | 1851 | 1851 | 1:1 |
| TooltipMinimalPerf.default | 2249 | 2250 | 1:1 |
| ItemLayoutMinimalPerf.default | 1160 | 1173 | 0.99:1 |
| ListCommonPerf.default | 608 | 615 | 0.99:1 |
| MenuButtonMinimalPerf.default | 1668 | 1687 | 0.99:1 |
| CustomToolbarPrototype.default | 2630 | 2663 | 0.99:1 |
| ButtonOverridesMissPerf.default | 1283 | 1312 | 0.98:1 |
| CheckboxMinimalPerf.default | 2063 | 2100 | 0.98:1 |
| ListWith60ListItems.default | 585 | 597 | 0.98:1 |
| LoaderMinimalPerf.default | 661 | 673 | 0.98:1 |
| ToolbarMinimalPerf.default | 882 | 898 | 0.98:1 |
| TreeWith60ListItems.default | 154 | 158 | 0.97:1 |
| PortalMinimalPerf.default | 160 | 166 | 0.96:1 |
| ChatWithPopoverPerf.default | 351 | 369 | 0.95:1 |
| TextAreaMinimalPerf.default | 431 | 458 | 0.94:1 |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| BaseButton | mount | 1179 | 1170 | 5000 | |
| Breadcrumb | mount | 2928 | 2957 | 1000 | |
| Checkbox | mount | 2652 | 2630 | 5000 | |
| CheckboxBase | mount | 2357 | 2323 | 5000 | |
| ChoiceGroup | mount | 4368 | 4392 | 5000 | |
| ComboBox | mount | 1239 | 1273 | 1000 | |
| CommandBar | mount | 9575 | 9578 | 1000 | |
| ContextualMenu | mount | 11208 | 11355 | 1000 | |
| DefaultButton | mount | 1357 | 1368 | 5000 | |
| DetailsRow | mount | 3606 | 3605 | 5000 | |
| DetailsRowFast | mount | 3641 | 3594 | 5000 | |
| DetailsRowNoStyles | mount | 3418 | 3513 | 5000 | |
| Dialog | mount | 3103 | 3102 | 1000 | |
| DocumentCardTitle | mount | 575 | 571 | 1000 | |
| Dropdown | mount | 3200 | 3203 | 5000 | |
| FocusTrapZone | mount | 2007 | 1988 | 5000 | |
| FocusZone | mount | 1959 | 2009 | 5000 | |
| GroupedList | mount | 52198 | 58622 | 2 | |
| GroupedList | virtual-rerender | 24827 | 24455 | 2 | |
| GroupedList | virtual-rerender-with-unmount | 95956 | 92807 | 2 | |
| GroupedListV2 | mount | 560 | 557 | 2 | |
| GroupedListV2 | virtual-rerender | 522 | 535 | 2 | |
| GroupedListV2 | virtual-rerender-with-unmount | 553 | 570 | 2 | |
| IconButton | mount | 1865 | 1905 | 5000 | |
| Label | mount | 729 | 735 | 5000 | |
| Layer | mount | 4266 | 4218 | 5000 | |
| Link | mount | 822 | 820 | 5000 | |
| MenuButton | mount | 1677 | 1673 | 5000 | |
| MessageBar | mount | 2368 | 2364 | 5000 | |
| Nav | mount | 3263 | 3279 | 1000 | |
| OverflowSet | mount | 1353 | 1361 | 5000 | |
| Panel | mount | 2545 | 2523 | 1000 | |
| Persona | mount | 1238 | 1282 | 1000 | |
| Pivot | mount | 1666 | 1647 | 1000 | |
| PrimaryButton | mount | 1507 | 1524 | 5000 | |
| Rating | mount | 7015 | 7071 | 5000 | |
| SearchBox | mount | 1534 | 1486 | 5000 | |
| Shimmer | mount | 2808 | 2840 | 5000 | |
| Slider | mount | 2086 | 2067 | 5000 | |
| SpinButton | mount | 4702 | 4653 | 5000 | |
| Spinner | mount | 795 | 794 | 5000 | |
| SplitButton | mount | 3102 | 3109 | 5000 | |
| Stack | mount | 858 | 858 | 5000 | |
| StackWithIntrinsicChildren | mount | 2348 | 2348 | 5000 | |
| StackWithTextChildren | mount | 4801 | 4785 | 5000 | |
| SwatchColorPicker | mount | 10526 | 10337 | 5000 | |
| TagPicker | mount | 2626 | 2698 | 5000 | |
| TeachingBubble | mount | 86243 | 87690 | 5000 | |
| Text | mount | 778 | 770 | 5000 | |
| TextField | mount | 1593 | 1593 | 5000 | |
| ThemeProvider | mount | 1522 | 1522 | 5000 | |
| ThemeProvider | virtual-rerender | 1090 | 1075 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 2137 | 2174 | 5000 | |
| Toggle | mount | 1097 | 1109 | 5000 | |
| buttonNative | mount | 533 | 545 | 5000 |
Improve test consistency across browsers. Firefox and Chrome/Edge can measure different things in certain scenarios so this commit updates the measurements for mount to account for this. The React Profiler has been enabled so we can get timing information from React. In particular this is useful for knowing when React started doing work.
a08591f to
e0cbefb
Compare
|
|
||
| terser@^4.1.2, terser@^4.3.9, terser@^4.6.12, terser@^4.6.2, terser@^4.6.3: | ||
| version "4.8.1" | ||
| version "4.8.0" |
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.
wondering what triggered this downgrade ?
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.
Not sure since the only dep change I made was to remove chromedriver and it does not depend on Terser. I've also pulled in upstream changes. Maybe something from there?
Hotell
left a comment
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.
approving for v-build affected changes
JustSlone
left a comment
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 see this is a large PR, I assume this is a one-time thing given the specific phase a development the test was in, and, in the future, we'll have more specific PRs for particular changes.
Tachometer sometimes fails during a test run. It's not entirely clear why this happens but it seems like there are two scenarios: 1. chromedriver needs to be installed or updated. Tachometer handles this dependency for us but when the dep is installed the test run fails. Subsequent test runs are fine so retry logic addresses this. 2. Timing is off. This issue is less clear but it seems like when a browser is slow to start Tachometer might time out. This doesn't seem like an actual issue with the tool and more just occasional flakiness in the system. While not addressing the root cause of either of these issues retry gives stress-test the ability to handle little speed bumps better.
* stress test: adds test cases for v8, v9 and web components Adds tests cases for - mounting - injecting styles - adding lots of nodes - removing all nodes - re-rendering the entire page for Fluent V8, V9 and Web Components. Introduces the concept of "renderers" that easily allow different components to be slotting into tests with just a query parameter. Moves RandomTree code to scripts to handle a ts-node compilation issue. This isn't ideal but it doesn't seem worth spending lots of time figuring the proper issue out right now. Similarly, some of the randomization code has been moved around in scripts because ts-node was having difficulty importing it. * stress test: configure fixtures, tree generation and sample sizes Adds a "target size" option to RandomTree that, when set, builds a tree to a specific size. Tweaks the default fixture parameters based on manual testing. Fixtures essentially double in size for each t-shirt size. Reduces the default number of Tachometer samples from 25 to 10. In some testing this still gives statistically significant results for all default sizes while making tests take significantly less time to run. * stress test: remove 'renderers' cli option This feature was removed in favor of query params. * stress test: update readme Fix inaccuracies, document new features. * stress-test: improve tests Improve test consistency across browsers. Firefox and Chrome/Edge can measure different things in certain scenarios so this commit updates the measurements for mount to account for this. The React Profiler has been enabled so we can get timing information from React. In particular this is useful for knowing when React started doing work. * Change default sample-size from 10 to 25 * add stress-test to codeowners * stress-test: add retry logic for tachometer Tachometer sometimes fails during a test run. It's not entirely clear why this happens but it seems like there are two scenarios: 1. chromedriver needs to be installed or updated. Tachometer handles this dependency for us but when the dep is installed the test run fails. Subsequent test runs are fine so retry logic addresses this. 2. Timing is off. This issue is less clear but it seems like when a browser is slow to start Tachometer might time out. This doesn't seem like an actual issue with the tool and more just occasional flakiness in the system. While not addressing the root cause of either of these issues retry gives stress-test the ability to handle little speed bumps better.
Current Behavior
We don't have any actual test cases.
New Behavior
Reduces test sample size from 25 to 10. This still gives statistically significant results but takes much less time to run.Related Issue(s)
Partially fixes #24424