From 21debe5b31e7df1e2a6b6b4a80f5549fc406f802 Mon Sep 17 00:00:00 2001 From: Chris H-C Date: Wed, 11 Nov 2015 14:01:00 +0100 Subject: [PATCH] Bug 1198196 - rework EVENTLOOP_UI_LAG_EXP_MS to record all lag. r=vladan Previously we were only logging if we accumulated 50ms of lag. Start logging all lag so we can use this measure to compare smaller changes in UI responsiveness. --- toolkit/components/telemetry/Histograms.json | 7 +++---- xpcom/threads/HangMonitor.cpp | 10 ++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 0612ca49ae52..e61b9dfc4747 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -4244,14 +4244,13 @@ "releaseChannelCollection": "opt-out", "description": "Whether the homepage was imported during browser migration. Only available on release builds during firstrun." }, - "EVENTLOOP_UI_LAG_EXP_MS": { + "EVENTLOOP_UI_ACTIVITY_EXP_MS": { "alert_emails": ["perf-telemetry-alerts@mozilla.com"], + "bug_numbers": [1198196], "expires_in_version": "never", "kind": "exponential", - "low": 50, "high": "60000", - "n_buckets": 20, - "extended_statistics_ok": true, + "n_buckets": 50, "description": "Widget: Time it takes for the message before a UI message (ms)" }, "FX_SESSION_RESTORE_STARTUP_INIT_SESSION_MS": { diff --git a/xpcom/threads/HangMonitor.cpp b/xpcom/threads/HangMonitor.cpp index c49d541cb9a3..7b0a82f5010e 100644 --- a/xpcom/threads/HangMonitor.cpp +++ b/xpcom/threads/HangMonitor.cpp @@ -370,16 +370,10 @@ NotifyActivity(ActivityType aActivityType) // penalties here. gTimestamp = PR_IntervalNow(); - // If we have UI activity we should reset the timer and report it if it is - // significant enough. + // If we have UI activity we should reset the timer and report it if (aActivityType == kUIActivity) { - // The minimum amount of lag time that we should report for telemetry data. - // Mozilla's UI responsiveness goal is 50ms - static const uint32_t kUIResponsivenessThresholdMS = 50; - if (cumulativeUILagMS > kUIResponsivenessThresholdMS) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::EVENTLOOP_UI_LAG_EXP_MS, + mozilla::Telemetry::Accumulate(mozilla::Telemetry::EVENTLOOP_UI_ACTIVITY_EXP_MS, cumulativeUILagMS); - } cumulativeUILagMS = 0; }