Closed Bug 1143714 Opened 10 years ago Closed 10 years ago

Throttle environment changes

Categories

(Toolkit :: Telemetry, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox38 --- unaffected
firefox39 --- fixed
firefox40 --- fixed

People

(Reporter: benjamin, Assigned: gfritzsche)

References

Details

Attachments

(1 file, 1 obsolete file)

If a user is disabling multiple addons quickly in a row, or making other changes, we will end up sending very short subsession pings for each change. This is not desirable. I believe we should throttle environment changes so that they happen at most once every N minutes (suggest N=5). In detail this is how I think it should work: * when we receive the "first" change notification, immediately reset/start a new subsession. * Any subsequent change that happens within N minutes should not reset the subsession but should update the environment block of the existing subsession.
Blocks: 1069869
No longer blocks: 1120356
Stealing.
Assignee: benjamin → gfritzsche
Status: NEW → ASSIGNED
Version: unspecified → Trunk
Attached patch Throttle environment changes (obsolete) — Splinter Review
This throttles the environment changes to only fire if there was no change in the last 5 minutes. Most of the patch is test updates.
Attachment #8580811 - Flags: review?(vdjeric)
Gonna wait for clarifications on the other patch https://bugzilla.mozilla.org/show_bug.cgi?id=1140558#c36
Rebased, part of this stack: https://pastebin.mozilla.org/8827100
Attachment #8580811 - Attachment is obsolete: true
Attachment #8580811 - Flags: review?(vdjeric)
Attachment #8583139 - Flags: review?(vdjeric)
Comment on attachment 8583139 [details] [diff] [review] Throttle environment changes Review of attachment 8583139 [details] [diff] [review]: ----------------------------------------------------------------- r+ once the test question is addressed ::: toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js @@ +937,5 @@ > + fakeNow(gNow); > + Preferences.set(PREF_TEST, 3); > + yield deferred.promise; > + > + Assert.equal(changeCount, 2); will this be 2 because of the throttling happening in _onEnvironmentChange or in _checkForAddonChanges? i.e. which message gets printed to the console
Attachment #8583139 - Flags: review?(vdjeric) → review+
Blocks: 1147828
(In reply to Vladan Djeric (:vladan) -- please needinfo! from comment #5) > ::: toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js > @@ +937,5 @@ > > + fakeNow(gNow); > > + Preferences.set(PREF_TEST, 3); > > + yield deferred.promise; > > + > > + Assert.equal(changeCount, 2); > > will this be 2 because of the throttling happening in _onEnvironmentChange > or in _checkForAddonChanges? i.e. which message gets printed to the console Because of the throttling in _onEnvironmentChange: > TelemetryEnvironment::_onEnvironmentChange - throttling changes, now: Mon Feb 01 2010 13:41:00 GMT+0100 (CET), last change: Mon Feb 01 2010 13:40:00 GMT+0100 (CET) Pref changes are not discarded for pending addon updates, only the addon/plugin/experiment changes go through there.
Being handled in bug 1139460.
Flags: needinfo?(gfritzsche)
Flags: needinfo?(gfritzsche)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Comment on attachment 8583139 [details] [diff] [review] Throttle environment changes Approved for Aurora. For approval request see bug 1139460 comment 42. For approval comments see bug 1139460 comment 43.
Attachment #8583139 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: