diff --git a/app/metrics.yaml b/app/metrics.yaml index 688888480..bc747c685 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -1984,3 +1984,57 @@ addons: notification_emails: - fenix-core@mozilla.com expires: "2020-09-01" + +startup.timeline: + framework_start: + send_in_pings: + - startup-timeline + type: timespan + time_unit: nanosecond + description: > + The duration the Android framework takes to start before letting us run code in + `*Application.init`. This is calculated from `appInitTimestamp - processStartTimestamp`. + `processStartTimestamp` is derived from the clock tick time unit, which is expected to be + less granular than nanoseconds. Therefore, we convert and round our timestamps to clock ticks + before computing the difference and convert back to nanoseconds to report. + + For debugging purposes, `clock_ticks_per_second`, which may vary between devices, is also + reported as a metric. + bugs: + - https://github.com/mozilla-mobile/fenix/issues/8803 + data_reviews: + - https://github.com/mozilla-mobile/fenix/pull/9788#issuecomment-610648980 + notification_emails: + - perf-android-fe@mozilla.com + - mcomella@mozilla.com + expires: "2020-10-01" + framework_start_error: + send_in_pings: + - startup-timeline + type: boolean + description: > + An error when attempting to record `framework_start` - the application init timestamp returned + a negative value - which is likely indicative of a bug in the implementation. + bugs: + - https://github.com/mozilla-mobile/fenix/issues/8803 + data_reviews: + - https://github.com/mozilla-mobile/fenix/pull/9788#issuecomment-610648980 + notification_emails: + - perf-android-fe@mozilla.com + - mcomella@mozilla.com + expires: "2020-10-01" + clock_ticks_per_second: + send_in_pings: + - startup-timeline + type: counter + description: > + The number of clock tick time units that occur in one second on this particular device. This + value is expected to be used in conjunction with the `framework_start` metric. + bugs: + - https://github.com/mozilla-mobile/fenix/issues/8803 + data_reviews: + - https://github.com/mozilla-mobile/fenix/pull/9788#issuecomment-610648980 + notification_emails: + - perf-android-fe@mozilla.com + - mcomella@mozilla.com + expires: "2020-10-01" diff --git a/app/pings.yaml b/app/pings.yaml index 3083e9ab0..7633e6ab5 100644 --- a/app/pings.yaml +++ b/app/pings.yaml @@ -29,3 +29,19 @@ installation: - https://github.com/mozilla-mobile/fenix/pull/8074#issuecomment-586512202 notification_emails: - fenix-core@mozilla.com + +startup-timeline: + description: > + This ping is intended to provide an understanding of startup performance. + + The ping is intended to be captured by performance testing automation to report results + there, in addition to user telemetry. We place these metrics into their own ping in order + to isolate them and make this process easier. + include_client_id: false + bugs: + - https://github.com/mozilla-mobile/fenix/issues/8803 + data_reviews: + - https://github.com/mozilla-mobile/fenix/pull/9788#issuecomment-610648980 + notification_emails: + - perf-android-fe@mozilla.com + - esmyth@mozilla.com diff --git a/docs/metrics.md b/docs/metrics.md index 7b23baad6..5bf6e2877 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -12,6 +12,7 @@ This means you might have to go searching through the dependency tree to get a f - [events](#events) - [installation](#installation) - [metrics](#metrics) + - [startup-timeline](#startup-timeline) ## activation @@ -242,6 +243,20 @@ The following metrics are added to the ping: | search.default_engine.name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |If the search engine is pre-loaded with Fenix this value will be the search engine name. If it's a custom search engine (defined: https://github.com/mozilla-mobile/fenix/issues/1607) the value will be "custom" |[1](https://github.com/mozilla-mobile/fenix/pull/1606), [2](https://github.com/mozilla-mobile/fenix/pull/5216)||2020-09-01 | | search.default_engine.submission_url |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |If the search engine is pre-loaded with Fenix this value will be he base URL we use to build the search query for the search engine. For example: https://mysearchengine.com/?query=%s. If it's a custom search engine (defined: https://github.com/mozilla-mobile/fenix/issues/1607) the value will be "custom" |[1](https://github.com/mozilla-mobile/fenix/pull/1606), [2](https://github.com/mozilla-mobile/fenix/pull/5216)||2020-09-01 | +## startup-timeline + +This ping is intended to provide an understanding of startup performance. +The ping is intended to be captured by performance testing automation to report results there, in addition to user telemetry. We place these metrics into their own ping in order to isolate them and make this process easier. + + +The following metrics are added to the ping: + +| Name | Type | Description | Data reviews | Extras | Expiration | +| --- | --- | --- | --- | --- | --- | +| startup.timeline.clock_ticks_per_second |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |The number of clock tick time units that occur in one second on this particular device. This value is expected to be used in conjunction with the `framework_start` metric. |[1](https://github.com/mozilla-mobile/fenix/pull/9788#issuecomment-610648980)||2020-10-01 | +| startup.timeline.framework_start |[timespan](https://mozilla.github.io/glean/book/user/metrics/timespan.html) |The duration the Android framework takes to start before letting us run code in `*Application.init`. This is calculated from `appInitTimestamp - processStartTimestamp`. `processStartTimestamp` is derived from the clock tick time unit, which is expected to be less granular than nanoseconds. Therefore, we convert and round our timestamps to clock ticks before computing the difference and convert back to nanoseconds to report. For debugging purposes, `clock_ticks_per_second`, which may vary between devices, is also reported as a metric. |[1](https://github.com/mozilla-mobile/fenix/pull/9788#issuecomment-610648980)||2020-10-01 | +| startup.timeline.framework_start_error |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |An error when attempting to record `framework_start` - the application init timestamp returned a negative value - which is likely indicative of a bug in the implementation. |[1](https://github.com/mozilla-mobile/fenix/pull/9788#issuecomment-610648980)||2020-10-01 | +