summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_process_impl.cc
diff options
context:
space:
mode:
authorrkaplow <rkaplow@chromium.org>2015-02-13 12:52:49 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-13 20:54:09 +0000
commit1b23b7d34f727d690cff990ef11a28513ce75ac4 (patch)
tree598feab6723abd97939f9938245f7a793a74832e /chrome/browser/browser_process_impl.cc
parenta5c856cf3ea4f69aa00c6c24676e0bca3f05962a (diff)
downloadchromium_src-1b23b7d34f727d690cff990ef11a28513ce75ac4.zip
chromium_src-1b23b7d34f727d690cff990ef11a28513ce75ac4.tar.gz
chromium_src-1b23b7d34f727d690cff990ef11a28513ce75ac4.tar.bz2
Add new histograms to measure time in PreMainMessageLoop.
I've identified areas which cause long delays through tracing and debugging, and want to collect metrics to see the effect in the wild. I've also added new trace events to match the new histograms. BUG=454789 Review URL: https://codereview.chromium.org/922333002 Cr-Commit-Position: refs/heads/master@{#316284}
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r--chrome/browser/browser_process_impl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 52bab4a..9fd1a60 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -16,6 +16,7 @@
#include "base/debug/leak_annotations.h"
#include "base/files/file_path.h"
#include "base/metrics/field_trial.h"
+#include "base/metrics/histogram_macros.h"
#include "base/path_service.h"
#include "base/prefs/json_pref_store.h"
#include "base/prefs/pref_registry_simple.h"
@@ -24,6 +25,7 @@
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/default_tick_clock.h"
+#include "base/trace_event/trace_event.h"
#include "chrome/browser/chrome_browser_main.h"
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -996,6 +998,10 @@ void BrowserProcessImpl::PreCreateThreads() {
}
void BrowserProcessImpl::PreMainMessageLoopRun() {
+ TRACE_EVENT0("startup", "BrowserProcessImpl::PreMainMessageLoopRun");
+ SCOPED_UMA_HISTOGRAM_TIMER(
+ "Startup.BrowserProcessImpl_PreMainMessageLoopRunTime");
+
#if defined(ENABLE_CONFIGURATION_POLICY)
// browser_policy_connector() is created very early because local_state()
// needs policy to be initialized with the managed preference values.