-
Notifications
You must be signed in to change notification settings - Fork 41
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 throttleCPU on page #1095
Merged
Merged
Add throttleCPU on page #1095
Conversation
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
ankur22
force-pushed
the
add/cpu-throttle
branch
2 times, most recently
from
November 9, 2023 17:04
a786e84
to
17637e3
Compare
ankur22
force-pushed
the
add/network-throttle
branch
from
November 9, 2023 17:08
a38f32c
to
16c8a12
Compare
ankur22
force-pushed
the
add/cpu-throttle
branch
2 times, most recently
from
November 9, 2023 17:21
8ea211b
to
426fdf3
Compare
ankur22
commented
Nov 9, 2023
ankur22
force-pushed
the
add/cpu-throttle
branch
3 times, most recently
from
November 10, 2023 17:32
9849922
to
06ba5e0
Compare
inancgumus
previously approved these changes
Nov 13, 2023
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.
Nice work! LGTM. Added some weakly held suggestions. Feel free to skip.
ka3de
reviewed
Nov 13, 2023
ankur22
force-pushed
the
add/network-throttle
branch
from
November 13, 2023 12:01
98693e5
to
ba04a12
Compare
ankur22
force-pushed
the
add/cpu-throttle
branch
from
November 13, 2023 13:32
06ba5e0
to
63afdee
Compare
ka3de
approved these changes
Nov 13, 2023
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.
LGTM.
inancgumus
approved these changes
Nov 14, 2023
This adds the bare bones implementation which includes all the changes to get it to work with the mapping layer and a new CPUProfile type.
This is added to the frame session. Each page can contain multiple frame sessions, and each frame session contains a single session. The CDP throttle cpu API works at the session level, whereas the new API we're adding works at the page scope. This implementation is required here before wiring it into the page.
This wires page up with its frame sessions, calling each frame session to action on the call to throttle the CPU.
This update adds the use of throttleCPU into the example test script.
ankur22
force-pushed
the
add/cpu-throttle
branch
from
November 14, 2023 09:15
c618da5
to
27cd1ab
Compare
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What?
This adds a new
throttleCPU
API onpage
which throttles the cpu from chrome's perspective.Why?
A good use case for throttling the cpu is to see (within a lab environment) how the frontend reacts when the test is ran on a mobile device. With new measurements under a constraint CPU, users will be able to fine tune their website so that the most important information is returned in an acceptable timeframe.
Checklist
Related PR(s)/Issue(s)
Updates: #887