New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 740625 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Feature

Blocking:
issue 731899



Sign in to add a comment

[Tab Metrics] Track swap metrics during session restore and background tab loading

Project Member Reported by shaseley@google.com, Jul 10 2017

Issue description

Swap metrics--- which are platform-specific ---are currently being tracked (experimental) for [swaps in|swaps out|decompressions|compressions] /second, depending on the platform.

These metrics should be tracked independently by the TabManager during session restore and background tab loading.

This is one of several metrics related to https://bugs.chromium.org/p/chromium/issues/detail?id=731899.
 
Project Member

Comment 1 by sheriffbot@chromium.org, Jul 11 2017

Labels: Hotlist-Google
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/665ee25743712ba0379911882dddb39ae7edbfac

commit 665ee25743712ba0379911882dddb39ae7edbfac
Author: Scott Haseley <shaseley@google.com>
Date: Tue Jul 18 00:15:06 2017

[Tab Metrics] Adding TabManagerStatsCollector to TabManager

This CL creates a separate class that is in charge of recording UMAs on behalf
of TabManager for tab and system-related properties and events during session
restore and background tab loading. The RecordSwitchTo metric method has been
moved out of TabManager and into TabManagerStatsCollector.

In this implementation, the TabManagerStatsCollector is scoped to the lifetime
and owned by the TabManager, and the TabManagerStatsCollector holds a pointer
to the TabManager.

Bug:  740625 
Change-Id: Ic3c77d5d99563ceefedab3d417721a7624d02ffe
Reviewed-on: https://chromium-review.googlesource.com/565353
Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Commit-Queue: Scott Haseley <shaseley@google.com>
Cr-Commit-Position: refs/heads/master@{#487311}
[modify] https://crrev.com/665ee25743712ba0379911882dddb39ae7edbfac/chrome/browser/BUILD.gn
[modify] https://crrev.com/665ee25743712ba0379911882dddb39ae7edbfac/chrome/browser/resource_coordinator/tab_manager.cc
[modify] https://crrev.com/665ee25743712ba0379911882dddb39ae7edbfac/chrome/browser/resource_coordinator/tab_manager.h
[add] https://crrev.com/665ee25743712ba0379911882dddb39ae7edbfac/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc
[add] https://crrev.com/665ee25743712ba0379911882dddb39ae7edbfac/chrome/browser/resource_coordinator/tab_manager_stats_collector.h
[add] https://crrev.com/665ee25743712ba0379911882dddb39ae7edbfac/chrome/browser/resource_coordinator/tab_manager_stats_collector_unittest.cc
[modify] https://crrev.com/665ee25743712ba0379911882dddb39ae7edbfac/chrome/browser/resource_coordinator/tab_manager_unittest.cc
[modify] https://crrev.com/665ee25743712ba0379911882dddb39ae7edbfac/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h
[modify] https://crrev.com/665ee25743712ba0379911882dddb39ae7edbfac/chrome/test/BUILD.gn

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7a02fce51501fb08c111e06d845bca0a6cbb8db4

commit 7a02fce51501fb08c111e06d845bca0a6cbb8db4
Author: Scott Haseley <shaseley@google.com>
Date: Tue Aug 01 21:55:01 2017

Refactoring SwapMetricsObserver to support multiple observers.

The current SwapMetricsObserver implementation combines how and how
often swap metrics are updated with the client side consumption of
the metrics. This CL splits the computation and frequency of swap
metrics with clients wishing to use the metrics, allowing a single
implementation of platform-specific computation while enabling
multiple independent observers. Additionally, the API is moved to
content/public/browser so it can be used by clients outside of
content/browser.

Much of SwapMetricsObserver has been moved to SwapMetricsDriver,
which drives the collection of the metrics. The SwapMetricsDriver
notifies an associated SwapMetricsDriver::Delegate about metrics
updates. There is one 1-1 relationship between drivers and delegates;
each driver has one delegate scoped at its lifetime. The driver
controls the frequency at which metrics are updated, and we assume
different clients will sample at different frequencies or over
different intervals, which requires multiple driver instances.

The existing periodic experimental UMAs have been moved to
SwapMetricsObserverUma.

Bug: chromium:740625 

Change-Id: I66d8cdf3c06ebadba31044ff203fdd803094157f
Reviewed-on: https://chromium-review.googlesource.com/565346
Commit-Queue: Scott Haseley <shaseley@google.com>
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491123}
[modify] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/BUILD.gn
[modify] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/browser_main_loop.cc
[modify] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/browser_main_loop.h
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/memory/swap_metrics_delegate_uma.cc
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/memory/swap_metrics_delegate_uma.h
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/memory/swap_metrics_driver_impl.cc
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/memory/swap_metrics_driver_impl.h
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/memory/swap_metrics_driver_impl_linux.cc
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/memory/swap_metrics_driver_impl_linux.h
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/memory/swap_metrics_driver_impl_mac.cc
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/memory/swap_metrics_driver_impl_mac.h
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/memory/swap_metrics_driver_impl_unittest.cc
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/browser/memory/swap_metrics_driver_impl_win.cc
[delete] https://crrev.com/5181009502bc37d6e731ac348a7ea304289587a7/content/browser/memory/swap_metrics_observer.cc
[delete] https://crrev.com/5181009502bc37d6e731ac348a7ea304289587a7/content/browser/memory/swap_metrics_observer.h
[delete] https://crrev.com/5181009502bc37d6e731ac348a7ea304289587a7/content/browser/memory/swap_metrics_observer_linux.cc
[delete] https://crrev.com/5181009502bc37d6e731ac348a7ea304289587a7/content/browser/memory/swap_metrics_observer_linux.h
[delete] https://crrev.com/5181009502bc37d6e731ac348a7ea304289587a7/content/browser/memory/swap_metrics_observer_mac.cc
[delete] https://crrev.com/5181009502bc37d6e731ac348a7ea304289587a7/content/browser/memory/swap_metrics_observer_mac.h
[delete] https://crrev.com/5181009502bc37d6e731ac348a7ea304289587a7/content/browser/memory/swap_metrics_observer_win.cc
[modify] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/public/browser/BUILD.gn
[add] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/public/browser/swap_metrics_driver.h
[modify] https://crrev.com/7a02fce51501fb08c111e06d845bca0a6cbb8db4/content/test/BUILD.gn

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d450cb9e0664b13ae630bfeb488b69c98cc30423

commit d450cb9e0664b13ae630bfeb488b69c98cc30423
Author: Scott Haseley <shaseley@google.com>
Date: Wed Aug 02 03:44:57 2017

Add session restore swap metrics UMAs to TabManager.

This CL adds UMAs for system swap metrics during session restore. The
implementation uses SwapMetricsDriver to collect the swap metrics during
session restore, and computes rates (e.g. swaps in/second) as an average over
the entire session restore interval. Swap metrics are platform-specific.
Currently, swap in/out rate is available on Linux and Mac, and page
compression/decompression rates are available on Mac only.

Bug:  740625 
Change-Id: I3dfb4268759e6900e768756b8939ad64de603a06
Reviewed-on: https://chromium-review.googlesource.com/585405
Commit-Queue: Scott Haseley <shaseley@google.com>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491254}
[modify] https://crrev.com/d450cb9e0664b13ae630bfeb488b69c98cc30423/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc
[modify] https://crrev.com/d450cb9e0664b13ae630bfeb488b69c98cc30423/chrome/browser/resource_coordinator/tab_manager_stats_collector.h
[modify] https://crrev.com/d450cb9e0664b13ae630bfeb488b69c98cc30423/tools/metrics/histograms/histograms.xml

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2ccc2f573320a2fe2630382882cbafa32bf8c4bf

commit 2ccc2f573320a2fe2630382882cbafa32bf8c4bf
Author: Scott Haseley <shaseley@google.com>
Date: Mon Aug 07 17:50:55 2017

Fix typos in TabManager swap metrics histograms

This CL fixes description and email typos in histograms added in
https://chromium-review.googlesource.com/c/585405.

Bug:  740625 
Change-Id: Ia683c9836f42db4892f7b55ee711e769b33e66e6
Reviewed-on: https://chromium-review.googlesource.com/601176
Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Commit-Queue: Scott Haseley <shaseley@google.com>
Cr-Commit-Position: refs/heads/master@{#492353}
[modify] https://crrev.com/2ccc2f573320a2fe2630382882cbafa32bf8c4bf/tools/metrics/histograms/histograms.xml

Comment 6 by shaseley@google.com, Aug 31 2017

Status: Fixed (was: Started)

Sign in to add a comment