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

Unified Diff: chrome/browser/background/background_contents_service.cc

Issue 874643003: Add UMA histogram timers for ProcessManager and BackgroundContentsService startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | extensions/browser/process_manager.cc » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background/background_contents_service.cc
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index f502748a09528098d63af52ba1c67691ecb0d18a..fb3888f4ec1fd4614de45a5a0107215ea6825a3c 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/message_loop/message_loop.h"
+#include "base/metrics/histogram.h"
Ilya Sherman 2015/02/05 02:50:26 nit: Please include histogram_macros instead.
Yoyo Zhou 2015/02/05 03:08:02 Done.
#include "base/prefs/pref_service.h"
#include "base/prefs/scoped_user_pref_update.h"
#include "base/strings/string_util.h"
@@ -343,10 +344,13 @@ void BackgroundContentsService::Observe(
const content::NotificationDetails& details) {
switch (type) {
case extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED: {
+ const base::TimeTicks start_time = base::TimeTicks::Now();
Profile* profile = content::Source<Profile>(source).ptr();
LoadBackgroundContentsFromManifests(profile);
LoadBackgroundContentsFromPrefs(profile);
SendChangeNotification(profile);
+ UMA_HISTOGRAM_TIMES("BackgroundContentsService.LoadOnExtensionsReadyTime",
+ base::TimeTicks::Now() - start_time);
break;
}
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED:
« no previous file with comments | « no previous file | extensions/browser/process_manager.cc » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698