Splitting FrameData class to FrameTree and Aggregate.
This CL splits the FrameData class into two more specific classes, FrameTreeData (which collects information about frame-level activities such as activation, along with performance information), and AggregateFrameData (which collects some additional aggregations we do for the entire page, along with performance information). By doing this, we are able to reduce the scope of what's both visible and stored by each class as well as remove some of the extraneous page-level data members from APLMO (such as non_ad_frame_data and ad_frame_data_by_visibility) and store them all under aggregate_frame_data_ instead to centralize where information is stored. While this simplifies the code overall, the end goal is to have two completely independent classes, and make calls to smaller subclasses that will aggregate the various types of data we need (network, cpu, and memory) rather than relying on inheritance. This CL is a first step in this, as it makes the split between the two classes in APLMO and simplifies the variables there. Follow-ups for this include: 1) Rename all enums so that they aren't held by the parent class. This is split apart because of the amount of code it touches. Likely these can just sit inside a namespace. 2) Add classes for the various types of measurement and convert member variables in both Aggregate and FrameTree to use them. 3) Remove the FrameTree class, add functionality to the subclasses. This should require only small amounts of duplicate code, as updating fields should be a function of the measurement classes. 3) Potentially merge main_frame_data_ into aggregate_frame_data_, adding members as necessary, as it's the one outlier in terms of requiring the use of FrameTreeData. Change-Id: Ib21d6285361507fc3c0ae7d0208d8f704950ccd5 Bug: 1136068 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359560 Commit-Queue: Eric Robinson <ericrobinson@chromium.org> Reviewed-by:John Delaney <johnidel@chromium.org> Cr-Commit-Position: refs/heads/master@{#820007}
Showing
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment