Closed Bug 1287712 Opened 8 years ago Closed 8 years ago

TimeDurationAccumulator reports should include running timer

Categories

(Core :: Audio/Video: Playback, defect)

50 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

Details

Attachments

(1 file)

In the current implementation of TimeDurationAccumulator, Total() and Count() return the total duration and count of segments so far, but if the timer is currently running (i.e., not Pause()'d) the currently-running segment is not counted.
This could mean that the recorded play time may be wrong if the timer was not properly paused before telemetry was collected!

It should be easy to add the running timer (without pausing).
If the timer is currently running, add started time segment until now to
Total(), and add 1 to Count().
This ensures correct values are returned without having to Pause().

Review commit: https://reviewboard.mozilla.org/r/65158/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/65158/
Attachment #8772325 - Flags: review?(cpearce)
Comment on attachment 8772325 [details]
Bug 1287712 - TimeDurationAccumulator includes running timer in reports -

https://reviewboard.mozilla.org/r/65158/#review62636
Attachment #8772325 - Flags: review?(cpearce) → review+
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd2f39397641
TimeDurationAccumulator includes running timer in reports - r=cpearce
https://hg.mozilla.org/mozilla-central/rev/bd2f39397641
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: