Closed Bug 826893 Opened 7 years ago Closed 7 years ago

Provider for application session information

Categories

(Firefox Health Report Graveyard :: Client: Desktop, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 20

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file)

Need to capture per day session counts, time active/inactive, and startup times (main, first paint, session restore).
There is much room for improvement in the reported values. See comments.
Attachment #698400 - Flags: review?(rnewman)
Comment on attachment 698400 [details] [diff] [review]
Provider for application sessions, v1

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

Your call if you want to spend the time to switch to tick counting rather than calculating intervals. Apologies for the bugs I missed!

::: services/healthreport/providers.jsm
@@ +328,5 @@
> +
> +  name: "current",
> +  version: 1,
> +
> +  FIELDS: [

LAST_NUMERIC_FIELDS

@@ +369,5 @@
> +
> +  name: "previous",
> +  version: 1,
> +
> +  FIELDS: [

DAILY_DISCRETE_NUMERIC_FIELDS

@@ +468,5 @@
> +      if (!(field in si)) {
> +        continue;
> +      }
> +
> +      let value = si[field] - si.process;

Ooh, obscure. Politely note somewhere that "si.process" is the timestamp of the "process" event, which implicitly means the start of this session?

@@ +515,5 @@
> +   */
> +  recordBrowserActivity: function (active) {
> +    // There is potential for clock skew to result in incorrect measurements
> +    // here. We should consider incrementing activeTime by the observer firing
> +    // interval.

Yeah, seems smarter to count ticks then multiply than to calculate intervals.
Attachment #698400 - Flags: review?(rnewman) → review+
https://hg.mozilla.org/services/services-central/rev/36592fb313ad

Will need follow-ups to refactor this one.
Whiteboard: [fixed in services]
Blocks: 827157
https://hg.mozilla.org/mozilla-central/rev/36592fb313ad
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [fixed in services]
Target Milestone: --- → mozilla20
Component: Metrics and Firefox Health Report → Client: Desktop
Product: Mozilla Services → Firefox Health Report
Target Milestone: mozilla20 → Firefox 20
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.