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

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

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

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