Closed Bug 1346714 Opened 7 years ago Closed 7 years ago

Consolidate session change throttling intervals

Categories

(Toolkit :: Telemetry, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: gfritzsche, Assigned: djmdeveloper060796, Mentored)

Details

(Whiteboard: [measurement:client] [lang=js])

Attachments

(1 file)

Currently we use two separate constants to throttle subsession changes:
- CHANGE_THROTTLE_INTERVAL_MS
- MIN_SUBSESSION_LENGTH_MS

https://dxr.mozilla.org/mozilla-central/search?q=path%3ATelemetrySession.jsm+regexp%3ACHANGE_THROTTLE_INTERVAL_MS%7CMIN_SUBSESSION_LENGTH_MS&redirect=false

We should:
- Use MIN_SUBSESSION_LENGTH_MS in both places.
- Use 5min here - the existing throttling time for the more common environment changes.
- Fix any tests.
- Make sure the documentation in sessions.rst is clear about the throttling intervals.
- Make sure preferences.rst is up-to-date.
Note that this is not a good first bug.
Mentor: alessio.placitelli, gfritzsche
Whiteboard: [measurement:client] → [measurement:client] [lang=js]
@Georg I would like to give this a try. So TelemetrySession.jsm is the only javascript file I need to edit right?
And where will I find preferences.rst?
Flags: needinfo?(gfritzsche)
@Georg should CHANGE_THROTTLE_INTERVAL_MS be removed and 5 min be hardcoded for MIN_SUBSESSION_LENGTH_MS?
(In reply to Deepjyoti Mondal from comment #3)
> @Georg should CHANGE_THROTTLE_INTERVAL_MS be removed and 5 min be hardcoded
> for MIN_SUBSESSION_LENGTH_MS?

Yes, but no hardcoding. We should just default to MIN_SUBSESSION_LENGTH_MS.
Flags: needinfo?(gfritzsche)
(In reply to Deepjyoti Mondal from comment #2)
> @Georg I would like to give this a try. So TelemetrySession.jsm is the only
> javascript file I need to edit right?

Yes, but you might have to change tests as well.
You can confirm tests still run fine using: mach test toolkit/components/telemetry/tests/unit
You probably want to make this test work first: mach test toolkit/components/telemetry/tests/unit/test_TelemetrySession.js

> And where will I find preferences.rst?

Try searching through the source code to find it.
@Georg thanks a lot for the pointers. I will upload a patch soon.
Attached patch bug1346714.patchSplinter Review
used MIN_SUBSESSION_LENGTH_MS in both places. I have tested locally, it passes all the tests
Attachment #8847664 - Flags: review?(gfritzsche)
Assignee: nobody → djmdeveloper060796
Comment on attachment 8847664 [details] [diff] [review]
bug1346714.patch

Review of attachment 8847664 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good, thanks!
Attachment #8847664 - Flags: review?(gfritzsche) → review+
Keywords: checkin-needed
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/009fb636215b
Consolidated session change throttling intervals. r=gfritzsche
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/009fb636215b
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: