Capture Telemetry to measure the time to render the first about:home

VERIFIED FIXED in Firefox 67

Status

()

enhancement
P1
normal
VERIFIED FIXED
3 months ago
10 days ago

People

(Reporter: mconley, Assigned: mconley)

Tracking

({github-merged})

unspecified
Firefox 67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 verified, firefox68 verified)

Details

(Whiteboard: [fxperf:p1])

Attachments

(3 attachments, 1 obsolete attachment)

(Assignee)

Description

3 months ago

By default, about:home is the first page that loads in a new browser session.

We want to measure and optimize the start-up timeline, including the time to display about:home.

As far as I can tell, we don't measure that time anywhere, so this bug is about getting that measurement recorded.

(Assignee)

Comment 2

3 months ago

Hey dmose,

So this is my hacky attempt at getting a best-estimate on when a significant chunk of about:home is presented to the user, under the following conditions:

  1. It's the first about:home the user has seen
  2. The user is configured to show about:home by default when starting, rather than restoring the previous session
  3. about:home hasn't been overridden with a new URI

The values I'm getting when tested locally seem to more or less line up with what's showing up in the profile, so I think my time delta is more or less correct.

The reason I ended up putting some gunk in the aboutNewTabService was because I wasn't sure what the expected lifetime of TelemetryFeed.jsm is, or whether or not it's a problem to have static state set in that module (the static state of, "I recorded this value before, please don't do it again").

If we expect TelemetryFeed to only ever be instantiated once, we can maybe put the state in a member variable. Or if it's okay to stash some state in the TelemetryFeed global, that works for me too. That way we can avoid moving that state over to aboutNewTabService.

Thoughts? Or can you think of a better way of capturing this?

Flags: needinfo?(dmose)
(Assignee)

Updated

3 months ago
Whiteboard: [fxperf] → [fxperf:p1]

:mconley: I'm in crunch mode this week, so I probably won't be able to get you useful feedback until next week. Sorry for the delay...

(Assignee)

Updated

3 months ago
Blocks: 1522877
(Assignee)

Comment 4

3 months ago

Redirecting to andreio at dmose's suggestion.

Flags: needinfo?(dmose) → needinfo?(andrei.br92)
(Assignee)

Updated

3 months ago
Assignee: nobody → mconley
(Assignee)

Comment 5

3 months ago

nanj has offered to look at this.

Flags: needinfo?(andrei.br92)
Attachment #9035474 - Attachment description: Bug 1518521 - [WIP] Record a scalar for how long it takes to present about:home after start-up. → Bug 1518521 - Record a scalar for how long it takes to present about:home after start-up. r?nanj
(Assignee)

Comment 7

3 months ago
Attachment #9040469 - Flags: review?(chutten)

Comment 9

3 months ago
Comment on attachment 9040469 [details]
Data collection review

DATA COLLECTION REVIEW RESPONSE:

    Is there or will there be documentation that describes the schema for the ultimate data set available publicly, complete and accurate?

Yes. This collection is Telemetry so is documented in its definitions file ([Scalars.yaml](https://hg.mozilla.org/mozilla-central/file/tip/toolkit/components/telemetry/Scalars.yaml)) and the [Probe Dictionary](https://telemetry.mozilla.org/probe-dictionary/).

    Is there a control mechanism that allows the user to turn the data collection on and off?

Yes. This collection is Telemetry so can be controlled through Firefox's Preferences.

    If the request is for permanent data collection, is there someone who will monitor the data over time?

Yes. :mconley is responsible for this collection.

    Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?

Category 1, Technical.

    Is the data collection request for default-on or default-off?

Default on for all channels.

    Does the instrumentation include the addition of any new identifiers?

No.

    Is the data collection covered by the existing Firefox privacy notice?

Yes.

    Does there need to be a check-in in the future to determine whether to renew the data?

No. This collection is permanent.

---
Result: datareview+
Attachment #9040469 - Flags: review?(chutten) → review+

Comment 10

3 months ago
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b88084ac4a0a
Add a scalar that measures time from process start to first paint of topsites in initial about:home. data-review=chutten, r=janerik
(Assignee)

Comment 11

3 months ago

Hey nanj, just a heads up that the patch to add the scalar is now on autoland.

Flags: needinfo?(najiang)

Comment 12

3 months ago

(In reply to Mike Conley (:mconley) (:⚙️) from comment #11)

Hey nanj, just a heads up that the patch to add the scalar is now on autoland.

Woot, also got the data+. will merge that patch after this.

Thanks!

Flags: needinfo?(najiang)
Blocks: 1512725

Comment 13

3 months ago
bugherder
Status: NEW → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Attachment #9035474 - Attachment is obsolete: true

Updated

2 months ago
Blocks: 1525452

Updated

2 months ago
Priority: -- → P1

Comment 14

2 months ago
Iteration: --- → 67.1 - Jan 28 - Feb 10
Keywords: github-merged

I have verified this issue with the latest Firefox Beta (67.0b9 Build ID - 20190408123043) and with the latest Firefox Nightly (68.0a1 Build ID - 20190410215612) installed, on Windows 10 x64, Arch Linux and Mac 10.13.3. Now, the new "timestamps.about_home_topsites_first_paint" scalar is displayed on the "about:telemetry#scalars-tab" page after a session restoration.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.