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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 57603002: Add UMA for profile creation during startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add description to histograms.xml Created 7 years, 1 month 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 0a33f916ed9b662faddb2fee7b455f95fcb36f02..fb9d57ee2fdad2db1d02b2710b0a32dea76756d9 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -329,6 +329,7 @@ Profile* CreateProfile(const content::MainFunctionParams& parameters,
const base::FilePath& user_data_dir,
const CommandLine& parsed_command_line) {
TRACE_EVENT0("startup", "ChromeBrowserMainParts::CreateProfile")
+ base::Time start = base::Time::Now();
if (profiles::IsMultipleProfilesEnabled() &&
parsed_command_line.HasSwitch(switches::kProfileDirectory)) {
g_browser_process->local_state()->SetString(prefs::kProfileLastUsed,
@@ -352,8 +353,11 @@ Profile* CreateProfile(const content::MainFunctionParams& parameters,
profile = g_browser_process->profile_manager()->GetProfile(
profile_path);
#endif
- if (profile)
+ if (profile) {
+ UMA_HISTOGRAM_LONG_TIMES(
+ "Startup.CreateFirstProfile", base::Time::Now() - start);
return profile;
+ }
#if !defined(OS_WIN)
// TODO(port): fix this. See comments near the definition of
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698