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

Effects list refactor continued: passive effects traversal #19374

Merged
merged 11 commits into from
Jul 29, 2020
Prev Previous commit
Next Next commit
Added gate to SchedulingProfiler test
  • Loading branch information
Brian Vaughn committed Jul 29, 2020
commit 0c59d069aae3c7d0654344cb10ae83c5c9cc3b24
Original file line number Diff line number Diff line change
Expand Up @@ -486,28 +486,51 @@ describe('SchedulingProfiler', () => {
ReactTestRenderer.create(<Example />, {unstable_isConcurrent: true});
});

expect(marks.map(normalizeCodeLocInfo)).toEqual([
'--schedule-render-512',
'--render-start-512',
'--render-stop',
'--commit-start-512',
'--layout-effects-start-512',
'--layout-effects-stop',
'--commit-stop',
'--passive-effects-start-512',
toggleComponentStacks(
'--schedule-state-update-1024-Example-\n in Example (at **)',
),
'--passive-effects-stop',
'--render-start-1024',
'--render-stop',
'--commit-start-1024',
'--layout-effects-start-1024',
'--layout-effects-stop',
'--commit-stop',
'--passive-effects-start-1024',
'--passive-effects-stop',
]);
gate(({old}) => {
if (old) {
expect(marks.map(normalizeCodeLocInfo)).toEqual([
'--schedule-render-512',
'--render-start-512',
'--render-stop',
'--commit-start-512',
'--layout-effects-start-512',
'--layout-effects-stop',
'--commit-stop',
'--passive-effects-start-512',
toggleComponentStacks(
'--schedule-state-update-1024-Example-\n in Example (at **)',
),
'--passive-effects-stop',
'--render-start-1024',
'--render-stop',
'--commit-start-1024',
'--commit-stop',
]);
} else {
expect(marks.map(normalizeCodeLocInfo)).toEqual([
'--schedule-render-512',
'--render-start-512',
'--render-stop',
'--commit-start-512',
'--layout-effects-start-512',
'--layout-effects-stop',
'--commit-stop',
'--passive-effects-start-512',
toggleComponentStacks(
'--schedule-state-update-1024-Example-\n in Example (at **)',
),
'--passive-effects-stop',
'--render-start-1024',
'--render-stop',
'--commit-start-1024',
'--layout-effects-start-1024',
'--layout-effects-stop',
'--commit-stop',
'--passive-effects-start-1024',
'--passive-effects-stop',
]);
}
});
});

// @gate enableSchedulingProfiler
Expand Down