Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Issue 2946683002: [GRC] Tab CPU Usage Observer (Closed)

Created:
3 years, 6 months ago by matthalp
Modified:
3 years, 5 months ago
CC:
chromium-reviews, fmeawad
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[GRC] Tab CPU Usage Observer This is a CoordinationUnitGraphObserver implementation that performs tab-level CPU usage attribution. Each process is given a namespace via a ProcessObserver class which itself holds onto a collection of TabObserver class instances that correspond to the tabs that are contained within it. Currently the implementation makes some naive assumptions: - Process CPU is evenly attributable among the tabs within it. For example, if a process with two CPU tabs has 50% utilization then each tab is attributed with 25%. - Any parentless-frame is assumed to correspond to a tab. In reality a tab (e.g. WebContents) can have have multiple parentless-frames because multiple navigations can exist within a single instance. R=oysteine@chromium.org,zhenw@chromium.org BUG=724306

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 1

Patch Set 3 : Integrate UKM #

Total comments: 8

Patch Set 4 : Add unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+607 lines, -11 lines) Patch
M chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h View 1 2 4 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc View 1 2 3 chunks +34 lines, -1 line 0 comments Download
M services/resource_coordinator/BUILD.gn View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M services/resource_coordinator/coordination_unit/coordination_unit_graph_observer.h View 1 2 2 chunks +12 lines, -0 lines 0 comments Download
M services/resource_coordinator/coordination_unit/coordination_unit_manager.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M services/resource_coordinator/coordination_unit/coordination_unit_manager.cc View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M services/resource_coordinator/coordination_unit/process_coordination_unit_impl.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M services/resource_coordinator/coordination_unit/process_coordination_unit_impl.cc View 1 2 1 chunk +1 line, -5 lines 0 comments Download
A services/resource_coordinator/coordination_unit/tab_cpu_usage_observer.h View 1 2 1 chunk +121 lines, -0 lines 0 comments Download
A services/resource_coordinator/coordination_unit/tab_cpu_usage_observer.cc View 1 2 1 chunk +250 lines, -0 lines 0 comments Download
A services/resource_coordinator/coordination_unit/web_contents_coordination_unit_impl_unittest.cc View 1 2 3 1 chunk +151 lines, -0 lines 0 comments Download
M services/resource_coordinator/public/cpp/resource_coordinator_interface.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M services/resource_coordinator/public/cpp/resource_coordinator_interface.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M services/resource_coordinator/public/interfaces/coordination_unit.mojom View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (10 generated)
matthalp
3 years, 6 months ago (2017-06-19 02:58:20 UTC) #4
lpy
3 years, 6 months ago (2017-06-19 04:34:42 UTC) #6
lpy
https://codereview.chromium.org/2946683002/diff/20001/services/resource_coordinator/coordination_unit/tab_cpu_usage_observer.h File services/resource_coordinator/coordination_unit/tab_cpu_usage_observer.h (right): https://codereview.chromium.org/2946683002/diff/20001/services/resource_coordinator/coordination_unit/tab_cpu_usage_observer.h#newcode1 services/resource_coordinator/coordination_unit/tab_cpu_usage_observer.h:1: // Copyright 2017 The Chromium Authors. All rights reserved. ...
3 years, 6 months ago (2017-06-23 21:20:59 UTC) #12
lpy
My comments are mainly in cpu usage observer, overall l-g to me. https://codereview.chromium.org/2946683002/diff/40001/services/resource_coordinator/coordination_unit/tab_cpu_usage_observer.cc File services/resource_coordinator/coordination_unit/tab_cpu_usage_observer.cc ...
3 years, 5 months ago (2017-06-27 06:46:35 UTC) #14
Zhen Wang
Should this be closed as we are using some other approach?
3 years, 5 months ago (2017-06-30 16:38:59 UTC) #15
matthalp
3 years, 5 months ago (2017-06-30 16:39:32 UTC) #16
On 2017/06/30 at 16:38:59, zhenw wrote:
> Should this be closed as we are using some other approach?

Yes -- closing.

Powered by Google App Engine
This is Rietveld 408576698