Closed Bug 1518521 Opened 6 years ago Closed 6 years ago

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

Categories

(Firefox :: New Tab Page, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
Firefox 67
Iteration:
67.1 - Jan 28 - Feb 10
Tracking Status
firefox67 --- verified
firefox68 --- verified

People

(Reporter: mconley, Assigned: mconley)

References

Details

(Keywords: github-merged, Whiteboard: [fxperf:p1])

Attachments

(3 files, 1 obsolete file)

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.

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)
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...

Blocks: 1522877

Redirecting to andreio at dmose's suggestion.

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

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
Attached file Data collection review
Attachment #9040469 - Flags: review?(chutten)
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+
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

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

Flags: needinfo?(najiang)

(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
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Attachment #9035474 - Attachment is obsolete: true
Blocks: 1525452
Priority: -- → P1
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
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: