diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 03:25:35 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 03:25:35 +0000 |
commit | 6a2a61d68c4011a6ff4697dc636b8e84f296d9fa (patch) | |
tree | cd704b26fb6089fa73a662cefab130c584c5df39 /chrome/browser/browser_shutdown.cc | |
parent | 23f919a74a2deedf4e49391f60ff2c36d9710c54 (diff) | |
download | chromium_src-6a2a61d68c4011a6ff4697dc636b8e84f296d9fa.zip chromium_src-6a2a61d68c4011a6ff4697dc636b8e84f296d9fa.tar.gz chromium_src-6a2a61d68c4011a6ff4697dc636b8e84f296d9fa.tar.bz2 |
Record logout time stats for Chrome OS.
Record lougout time stats and dump it to /tmp/logout-times-sent.
ShutdownTime.Logout, ShutdownTime.UIMessageLoopEnded, and
ShutdownTime.BrowserDeleted will be sent to UMA, as well.
% cat /tmp/logout-times-sent
ShutdownTime.Logout: 0.39
0.00 +0.00 LogoutStarted
0.00 +0.00 ShutdownDetected
0.02 +0.02 StartedClosingWindows
0.27 +0.25 UIMessageLoopEnded
0.27 +0.00 BrowserShutdownStarted
0.39 +0.12 BrowserDeleted
0.39 +0.00 BrowserMainEnded
Along the way, change BootTimesLoader to append data to existing
/tmp/uptime-* files just like /sbin/bootstat does, so we can collect
numbers from 2nd login as well.
BUG=chromium-os:6847
TEST=confirmed that /tmp/login-times-sent and /tmp/logout-times-sent are written properly.
Review URL: http://codereview.chromium.org/4973002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66923 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_shutdown.cc')
-rw-r--r-- | chrome/browser/browser_shutdown.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index 8f1fb80..e136ef8 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -43,6 +43,10 @@ #include "chrome/browser/rlz/rlz.h" #endif +#if defined(OS_CHROMEOS) +#include "chrome/browser/chromeos/boot_times_loader.h" +#endif + using base::Time; using base::TimeDelta; @@ -101,6 +105,10 @@ FilePath GetShutdownMsPath() { } void Shutdown() { +#if defined(OS_CHROMEOS) + chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker( + "BrowserShutdownStarted", false); +#endif // During shutdown we will end up some blocking operations. But the // work needs to get done and we're going to wait for them no matter // what thread they're on, so don't worry about it slowing down @@ -162,6 +170,10 @@ void Shutdown() { // before calling UninstallJankometer(). delete g_browser_process; g_browser_process = NULL; +#if defined(OS_CHROMEOS) + chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("BrowserDeleted", + true); +#endif // Uninstall Jank-O-Meter here after the IO thread is no longer running. UninstallJankometer(); |