-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add a performance metric to measure typing within containers #46529
Conversation
Size Change: 0 B Total Size: 1.32 MB ℹ️ View Unchanged
|
This PR right now includes the fix from #46527 so the results are very visible for this new metric compared to trunk. |
66d1feb
to
6d4e56f
Compare
The fix is now in trunk, so I've rebased this and now the metric should be stable compared to trunk. |
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.
Thanks for adding this test! I left a question on the structure below, but I'm happy either way so feel free to ignore it 😄
it( 'Typing within containers', async () => { | ||
// Measuring block selection performance. | ||
await createNewPost(); | ||
await loadHtmlIntoTheBlockEditor( |
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.
Would it make sense to instead add this test in another describe
, so we don't have to go through the setup steps twice? I can't think offhand of any other container-specific tests we might want to run but it's possible there may be others in the future.
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 thought about this a bit and I'm not entirely sure what's the best solution here. Ideally each it
is independent. Right now, some of them are:
- typing in container, selecting blocks as both create new posts in the beginning
- the remaining ones are not independent in the sense that they use whatever is loaded before the test starts (and it seems to be different across metrics depending on where they are placed).
So I do think there's something to be done to improve how things are organized and make it consistent but let's leave this for its dedicated PR and address it for all the tests and not just this particular one.
Related #46527
What and wy?
This PR adds a performance metric that serves to measuring typing with containers as typing at the root level can remain stable while this degrades (see #46527)
To test you can try running
npm run test:performance packages/e2e-tests/specs/performance/post-editor.test.js
locally or you can take a look at the performance job on this PR.