For #18836: add metric perf.startup.startup_type.

upstream-sync
Michael Comella 3 years ago committed by Michael Comella
parent a64540bd06
commit aa3846212c

@ -4492,6 +4492,81 @@ perf.startup:
- perf-android-fe@mozilla.com
- mcomella@mozilla.com
expires: "2021-08-11"
startup_type:
type: labeled_counter
description: |
Indicates how the browser was started. The label is divided into two
variables. `state` is how cached the browser is when started. `path` is
what code path we are expected to take. Together, they create a combined
label: `state_path`. For brevity, the specific states are documented in
the [Fenix perf
glossary](https://wiki.mozilla.org/index.php?title=Performance/Fenix/Glossary).
<br><br>
This implementation is intended to be simple, not comprehensive. We list
the implications below.
<br><br>
These ways of opening the app undesirably adds events to our primary
buckets (non-`unknown` cases):
<br>- App switcher cold/warm: `cold/warm_` + duplicates path from
previous launch
<br>- Home screen shortcuts: `*_view`
<br>- An Intent is sent internally that's uses `ACTION_MAIN` or
`ACTION_VIEW` could be: `*_main/view` (unknown if this ever happens)
<br>- A command-line launch uses `ACTION_MAIN` or `ACTION_VIEW` could be:
`*_main/view`
<br><br>
These ways of opening the app undesirably do not add their events to our
primary buckets:
<br>- Close and reopen the app very quickly: no event is recorded.
<br><br>
These ways of opening the app don't affect our primary buckets:
<br>- App switcher hot: `hot_unknown`
<br>- PWA (all states): `unknown_unknown`
<br>- Custom tab: `unknown_view`
<br>- Cold start where a service or other non-activity starts the process
(not manually tested) - this seems to happen if you have the homescreen
widget: `unknown_*`
<br>- Another activity is drawn before HomeActivity (e.g. widget voice
search): `unknown_*`
<br>- Widget text search: `*_unknown`
<br><br>
In addition to the events above, the `unknown` state may be chosen when we
were unable to determine a cause due to implementation details or the API
was used incorrectly. We may be able to record the events listed above
into different buckets but we kept the implementation simple for now.
<br><br>
N.B.: for implementation simplicity, we duplicate the logic in app that
determines `path` so it's not perfectly accurate. In one way, we record we
is intended to happen rather than what actually happened (e.g. the user
may click a link so we record VIEW but the app does a MAIN by going to the
homescreen because the link was invalid).
labels:
- cold_main
- cold_view
- cold_unknown
- warm_main
- warm_view
- warm_unknown
- hot_main
- hot_view
- hot_unknown
- unknown_main
- unknown_view
- unknown_unknown
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18836
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/19028
data_sensitivity:
- interaction
notification_emails:
- perf-android-fe@mozilla.com
- mcomella@mozilla.com
expires: "2021-10-09"
perf.awesomebar:
history_suggestions:

@ -366,6 +366,7 @@ In addition to those built-in metrics, the following metrics are added to the pi
| perf.startup.home_activity_on_start |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |The duration of `HomeActivity.onStart`. This may encapsulate `HomeFragment` or `BrowserFragment` creation, depending on the code path, so we expect this to take varying amounts of time. As such, this probe may not be easy to interpret directly but we believe collecting it may give us more information about different patterns we might see in performance data. |[mozilla-mobile/fenix#18558](https://github.com/mozilla-mobile/fenix/pull/18558#issue-596791848)||2021-08-11 |1 |
| perf.startup.home_fragment_on_create_view |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |The duration of `HomeFragment.onCreateView`. |[mozilla-mobile/fenix#18558](https://github.com/mozilla-mobile/fenix/pull/18558#issue-596791848)||2021-08-11 |1 |
| perf.startup.home_fragment_on_view_created |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |The duration of `HomeFragment.onViewCreated`. |[mozilla-mobile/fenix#18558](https://github.com/mozilla-mobile/fenix/pull/18558#issue-596791848)||2021-08-11 |1 |
| perf.startup.startup_type |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Indicates how the browser was started. The label is divided into two variables. `state` is how cached the browser is when started. `path` is what code path we are expected to take. Together, they create a combined label: `state_path`. For brevity, the specific states are documented in the [Fenix perf glossary](https://wiki.mozilla.org/index.php?title=Performance/Fenix/Glossary). <br><br> This implementation is intended to be simple, not comprehensive. We list the implications below. <br><br> These ways of opening the app undesirably adds events to our primary buckets (non-`unknown` cases): <br>- App switcher cold/warm: `cold/warm_` + duplicates path from previous launch <br>- Home screen shortcuts: `*_view` <br>- An Intent is sent internally that's uses `ACTION_MAIN` or `ACTION_VIEW` could be: `*_main/view` (unknown if this ever happens) <br>- A command-line launch uses `ACTION_MAIN` or `ACTION_VIEW` could be: `*_main/view` <br><br> These ways of opening the app undesirably do not add their events to our primary buckets: <br>- Close and reopen the app very quickly: no event is recorded. <br><br> These ways of opening the app don't affect our primary buckets: <br>- App switcher hot: `hot_unknown` <br>- PWA (all states): `unknown_unknown` <br>- Custom tab: `unknown_view` <br>- Cold start where a service or other non-activity starts the process (not manually tested) - this seems to happen if you have the homescreen widget: `unknown_*` <br>- Another activity is drawn before HomeActivity (e.g. widget voice search): `unknown_*` <br>- Widget text search: `*_unknown` <br><br> In addition to the events above, the `unknown` state may be chosen when we were unable to determine a cause due to implementation details or the API was used incorrectly. We may be able to record the events listed above into different buckets but we kept the implementation simple for now. <br><br> N.B.: for implementation simplicity, we duplicate the logic in app that determines `path` so it's not perfectly accurate. In one way, we record we is intended to happen rather than what actually happened (e.g. the user may click a link so we record VIEW but the app does a MAIN by going to the homescreen because the link was invalid). |[mozilla-mobile/fenix#19028](https://github.com/mozilla-mobile/fenix/pull/19028)|<ul><li>cold_main</li><li>cold_view</li><li>cold_unknown</li><li>warm_main</li><li>warm_view</li><li>warm_unknown</li><li>hot_main</li><li>hot_view</li><li>hot_unknown</li><li>unknown_main</li><li>unknown_view</li><li>unknown_unknown</li></ul>|2021-10-09 |2 |
| preferences.accessibility_services |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has touch exploration or switch services enabled. These are built into the Android OS, not Fenix prefs. default: "" |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| preferences.open_links_in_a_private_tab |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has enabled open links in a private tab. default: false |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| preferences.open_links_in_app |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has the open links in apps feature enabled. default: false |[mozilla-mobile/fenix#11446](https://github.com/mozilla-mobile/fenix/pull/11446), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |

Loading…
Cancel
Save