Record a count of times when session restore resulted in zero tabs restored
Categories
(Firefox :: Session Restore, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: sfoster, Assigned: sfoster)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fidefe-session-restore])
Attachments
(1 external file)
session_restore.number_of_tabs_restored counts the number of tabs in the session that has just been restored. The minimum value is 1. The original motivation in bug 1198898 was to provide context for the startup time recorded - it helps us track one of the key inputs into startup performance. ISTM it may also be useful as a simple proxy for the work session restore is doing on behalf of the user, and as such a dip in the aggregate number is a warning sign. If we're concerned with what got restored as well as how long it took, this number is currently a little misleading. If 0 tabs restored would be an interesting number to know, we don't actually have any visibility in that currently.
As it stands, a restore that delivered nothing is indistinguishable from no restore having been attempted - both produce no sample. We have other metrics for restore outcome, so maybe this is ok? At minimum I think we should clarify what is (and isn't) being counted in the metric's description.
Updated•2 months ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
The early return here drops all five metrics in the group, not just number_of_tabs_restored. It is driven by eager-tab activity (_latestRestoredTimeStamp == _startTimeStamp), not on tab count, so a restore that opened three windows with 40 tab slots and then stalled throws away a count we already had.
We have other metrics for restore outcome, so maybe this is ok?
session_restore.number_of_tabs_restored only samples restores that were going well enough to load one tab and the other restore-outcome metrics sit behind this same return, so nothing covers this today. I'm updating the bug title as there are plausible paths to an outcome with 0 tabs restored. Bug 2080961 records whether a restore actually delivered, but leaves window and tab counts out of its own payload on the grounds that fixing them here is the right place rather than adding a separate count. Otherwise it can report that a restore didn't deliver but not how far it got.
Proposed fix: move the early return so it only guards the two duration metrics, and record the three counts on every restore attempt. A recorded sample will then mean "a restore was attempted" and no sample means "none was".
Note that number_of_tabs_restored has current range_min: 1, so we need to either confirm that a underflowing value will get recorded or amend that range (and the description for it and any queries that rely on it). For testing, StartupPerformance only runs during a real startup, so we'll need to cover this with a marionette test - test_session_decision.py is the closest template.
| Assignee | ||
Comment 2•1 month ago
|
||
- restore complete in StartupPerformance only records durations when there's been (eager) tabs created
- but always records window and tab/eager-tab counts so we catch the 0 values
- a restore that opens 0 windows was previously not recorded because the deadline timer only starts per restored window, so sessionstore-windows-restored is now watched as well.
Updated•1 month ago
|
Comment 4•1 month ago
|
||
| bugherder | ||
Comment 6•1 month ago
|
||
Backed out for causing marionette failures and it was requested by dev and approved by Aryx to be backed out.
https://hg.mozilla.org/integration/autoland/rev/0ac27b096ed44762d8af48a789022332bd50d129
| Assignee | ||
Comment 7•1 month ago
|
||
Noted. I'll probably try to re-land this and Bug 2071519 as a stack once I get a green try push.
Comment 9•1 month ago
|
||
| bugherder | ||
Updated•18 days ago
|
Description
•