Skip to content

Commit

Permalink
For mozilla-mobile#8803: add StartupTimeline ping type and framework_…
Browse files Browse the repository at this point in the history
…start metrics.
  • Loading branch information
mcomella committed Apr 16, 2020
1 parent aef827e commit 17d1ef3
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
54 changes: 54 additions & 0 deletions app/metrics.yaml
Expand Up @@ -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"
16 changes: 16 additions & 0 deletions app/pings.yaml
Expand Up @@ -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
15 changes: 15 additions & 0 deletions docs/metrics.md
Expand Up @@ -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
Expand Down Expand Up @@ -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 |


<!-- AUTOGENERATED BY glean_parser. DO NOT EDIT. -->

0 comments on commit 17d1ef3

Please sign in to comment.