-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Improve performance testing #20802
Merged
Merged
Improve performance testing #20802
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 not sure that's enough, I know previously keydown was also a problem.
You can see in the screenshot that there's aa keydown and then a keypress. Both of these are gathered in a "Task". and after that there are "follow up async tasks).
Ideally, if we can meansure the three segments it would be great, I believe the most important thing is the sync behavior (keydown + keypress). A format like that might be best
keydown+keypress ( follow-ups: xx )
eg:25ms ( follow-ups: 40ms )
What do you think?
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 don't think it will make much difference, since I expect the absolute values not to be as important as their evolution over time, and the
keydown
/keyup
events don't seem to have a great deal of variability.That said, for completeness sake, I added a commit where I calculate the sum of the three event durations for a total value for each virtual key press.
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 just noticed that you'd suggested separating out the values of the different event types in the output. Do you think that's necessary, or is the sum enough?
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.
That sum is enough for the first part (the synchronous work). I don't know though if it's possible somehow to compute the time spent in the asynchronous work. In the trace it's shown as separate from keydown, keyup, keypress event, it's shown as multiple small tasks.
I'd say, getting that value is less important but if we manage to get it, we shouldn't sum it with the rest.
does that make sense?
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'd argue that whether or not the async value is important depends on what you're trying to measure. If you're trying to measure input latency as perceived by the user, then the async value isn't important, as that work happens after the screen has updated and probably does not limit interactivity in any way, as the tasks are very short.
In any case, I suspect it would be extremely difficult to get that value, as there wouldn't be a good way of correlating the async work with the key events that triggered it.