Commit 7ed0b916 authored by rtenneti@chromium.org's avatar rtenneti@chromium.org

Added histograms to track duration when StartupTimeBomb goes off.

When StartupTimebomb goes off, collect the duration stats (difference
between when the timebomb went off and when it is started). We collect
this duration in terms of clock time, montonic clock time and thread CPU
time.

BUG=366699
R=jar@chromium.org

Review URL: https://codereview.chromium.org/273963002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269602 0039d316-1c4b-4281-b951-d872f2087c98
parent 9c30db38
...@@ -910,13 +910,13 @@ class StartupWatchDogThread : public base::Watchdog { ...@@ -910,13 +910,13 @@ class StartupWatchDogThread : public base::Watchdog {
return; return;
#else // Android release: gather stats to figure out when to crash. #else // Android release: gather stats to figure out when to crash.
// TODO(rtenneti): Delete this code, after getting data. // TODO(rtenneti): Delete this code, after getting data.
UMA_HISTOGRAM_TIMES("StartupTimebomm.Alarm.TimeDuration", UMA_HISTOGRAM_TIMES("StartupTimeBomb.Alarm.TimeDuration",
base::Time::Now() - start_time_clock_); base::Time::Now() - start_time_clock_);
UMA_HISTOGRAM_TIMES("StartupTimebomm.Alarm.TimeTicksDuration", UMA_HISTOGRAM_TIMES("StartupTimeBomb.Alarm.TimeTicksDuration",
base::TimeTicks::Now() - start_time_monotonic_); base::TimeTicks::Now() - start_time_monotonic_);
if (base::TimeTicks::IsThreadNowSupported()) { if (base::TimeTicks::IsThreadNowSupported()) {
UMA_HISTOGRAM_TIMES( UMA_HISTOGRAM_TIMES(
"StartupTimebomm.Alarm.ThreadNowDuration", "StartupTimeBomb.Alarm.ThreadNowDuration",
base::TimeTicks::ThreadNow() - start_time_thread_now_); base::TimeTicks::ThreadNow() - start_time_thread_now_);
} }
return; return;
......
...@@ -26692,6 +26692,14 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -26692,6 +26692,14 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary> </summary>
</histogram> </histogram>
<histogram name="StartupTimeBomb.Alarm" units="milliseconds">
<owner>rtenneti@chromium.org</owner>
<summary>
Time duration measured from the time the startup timebomb was started and
when it went off.
</summary>
</histogram>
<histogram name="Suggestions.FailedRequestErrorCode" enum="NetErrorCodes"> <histogram name="Suggestions.FailedRequestErrorCode" enum="NetErrorCodes">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner> <owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary> <summary>
...@@ -45816,6 +45824,13 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -45816,6 +45824,13 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<affected-histogram name="Net.SSL_Connection_Latency_Google"/> <affected-histogram name="Net.SSL_Connection_Latency_Google"/>
</histogram_suffixes> </histogram_suffixes>
<histogram_suffixes name="StartupTimeBombAlarm" separator=".">
<suffix name="ThreadNowDuration" label="Duration is in thread CPU time."/>
<suffix name="TimeDuration" label="Duration is in clock time."/>
<suffix name="TimeTicksDuration" label="Duration is in TimeTicks time."/>
<affected-histogram name="StartupTimeBomb.Alarm"/>
</histogram_suffixes>
<histogram_suffixes name="SyzygyStartupTime"> <histogram_suffixes name="SyzygyStartupTime">
<suffix name="PreReadEnabled"/> <suffix name="PreReadEnabled"/>
<suffix name="PreReadDisabled"/> <suffix name="PreReadDisabled"/>
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