Commit 1b3f4a4b authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

RC: Add a histogram to record late performance measurements.

Bug: 755840
Change-Id: I276f74b89cfaab3b3d45ed1e1d0b335ff6299fae
Reviewed-on: https://chromium-review.googlesource.com/1165853Reviewed-by: default avatarChris Hamilton <chrisha@chromium.org>
Reviewed-by: default avatarRobert Kaplow (slow) <rkaplow@chromium.org>
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581606}
parent f14f5166
......@@ -4,6 +4,7 @@
#include "chrome/browser/resource_coordinator/tab_manager_resource_coordinator_signal_observer.h"
#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/resource_coordinator/tab_load_tracker.h"
......@@ -82,6 +83,17 @@ void TabManager::ResourceCoordinatorSignalObserver::
const PageNavigationIdentity& page_navigation_id,
base::TimeDelta cpu_usage_estimate,
uint64_t private_footprint_kb_estimate) {
auto* page_signal_receiver = PageSignalReceiver::GetInstance();
DCHECK_NE(nullptr, page_signal_receiver);
bool late_notification =
page_signal_receiver->GetNavigationIDForWebContents(web_contents) !=
page_navigation_id.navigation_id;
UMA_HISTOGRAM_BOOLEAN(
"ResourceCoordinator.Measurement.Memory.LateNotification",
late_notification);
// TODO(siggi): Persist the measurement associated to |url|'s site.
}
......
......@@ -82857,6 +82857,15 @@ uploading your change for review.
</summary>
</histogram>
<histogram name="ResourceCoordinator.Measurement.Memory.LateNotification"
enum="Boolean">
<owner>siggi@chromium.org</owner>
<summary>
A boolean that measures how often a performance measurement notification
arrives at a WebContents that has been re-navigated.
</summary>
</histogram>
<histogram name="ResourceCoordinator.Measurement.Memory.Outcome"
enum="MemoryMeasurementOutcome">
<owner>siggi@chromium.org</owner>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment