Bug 715947 - add telemetry for timers fired; r=bz

This commit is contained in:
Nathan Froyd 2012-01-10 13:33:31 -05:00
Родитель 218e8b14d7
Коммит ce0de4ac1e
2 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -9181,6 +9181,8 @@ nsGlobalWindow::RunTimeout(nsTimeout *aTimeout)
// the logic in ResetTimersForNonBackgroundWindow will need to change. // the logic in ResetTimersForNonBackgroundWindow will need to change.
mTimeoutInsertionPoint = &dummy_timeout; mTimeoutInsertionPoint = &dummy_timeout;
Telemetry::AutoCounter<Telemetry::DOM_TIMERS_FIRED_PER_NATIVE_TIMEOUT> timeoutsRan;
for (timeout = FirstTimeout(); for (timeout = FirstTimeout();
timeout != &dummy_timeout && !IsFrozen(); timeout != &dummy_timeout && !IsFrozen();
timeout = nextTimeout) { timeout = nextTimeout) {
@ -9232,6 +9234,7 @@ nsGlobalWindow::RunTimeout(nsTimeout *aTimeout)
nsTimeout *last_running_timeout = mRunningTimeout; nsTimeout *last_running_timeout = mRunningTimeout;
mRunningTimeout = timeout; mRunningTimeout = timeout;
timeout->mRunning = true; timeout->mRunning = true;
++timeoutsRan;
// Push this timeout's popup control state, which should only be // Push this timeout's popup control state, which should only be
// eabled the first time a timeout fires that was created while // eabled the first time a timeout fires that was created while

Просмотреть файл

@ -319,6 +319,11 @@ HISTOGRAM(HTML_REFLOW_MS, 1, 3000, 10, EXPONENTIAL, "HTML reflows (ms)")
HISTOGRAM(XUL_INITIAL_FRAME_CONSTRUCTION, 1, 3000, 10, EXPONENTIAL, "initial xul frame construction") HISTOGRAM(XUL_INITIAL_FRAME_CONSTRUCTION, 1, 3000, 10, EXPONENTIAL, "initial xul frame construction")
HISTOGRAM_BOOLEAN(XMLHTTPREQUEST_ASYNC_OR_SYNC, "Type of XMLHttpRequest, async or sync") HISTOGRAM_BOOLEAN(XMLHTTPREQUEST_ASYNC_OR_SYNC, "Type of XMLHttpRequest, async or sync")
/**
* DOM telemetry.
*/
HISTOGRAM(DOM_TIMERS_FIRED_PER_NATIVE_TIMEOUT, 1, 3000, 10, EXPONENTIAL, "DOM: Timer handlers called per native timer expiration")
/** /**
* DOM Storage telemetry. * DOM Storage telemetry.
*/ */