This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For #20596 remove startup timeline probes
- Loading branch information
Showing
11 changed files
with
33 additions
and
630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4405,129 +4405,6 @@ addons: | |
- [email protected] | ||
expires: "2021-12-01" | ||
|
||
startup.timeline: | ||
framework_primary: | ||
disabled: true | ||
send_in_pings: | ||
- startup-timeline | ||
type: timespan | ||
time_unit: millisecond | ||
description: | | ||
The duration the Android framework takes to start before letting us run | ||
code in `*Application.init` when this device has | ||
`clock_ticks_per_second_v2` equal to 100: if it's not equal to 100, then | ||
this value is captured in `framework_secondary`. We split this into two | ||
metrics to make it easier to analyze in GLAM. We split on 100 because | ||
when we did our initial brief analysis - | ||
https://sql.telemetry.mozilla.org/queries/75591 - the results for clocks | ||
ticks were overwhelmingly 100. | ||
The duration 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_v2`, which may vary | ||
between devices, is also reported as a metric | ||
bugs: | ||
- https://github.com/mozilla-mobile/fenix/issues/8803 | ||
- https://github.com/mozilla-mobile/fenix/issues/17972 | ||
data_reviews: | ||
- https://github.com/mozilla-mobile/fenix/pull/9788#pullrequestreview-394228626 | ||
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068 | ||
- https://github.com/mozilla-mobile/fenix/pull/18043#issue-575389284 | ||
data_sensitivity: | ||
- technical | ||
notification_emails: | ||
- [email protected] | ||
- [email protected] | ||
expires: "2021-08-01" | ||
framework_secondary: | ||
disabled: true | ||
send_in_pings: | ||
- startup-timeline | ||
type: timespan | ||
time_unit: millisecond | ||
description: | | ||
The duration the Android framework takes to start before letting us run | ||
code in `*Application.init` when this device has | ||
`clock_ticks_per_second_v2` not equal to 100. For more details on this | ||
metric, see `framework_primary` | ||
bugs: | ||
- https://github.com/mozilla-mobile/fenix/issues/17972 | ||
data_reviews: | ||
- https://github.com/mozilla-mobile/fenix/pull/18043#issue-575389284 | ||
data_sensitivity: | ||
- technical | ||
notification_emails: | ||
- [email protected] | ||
- [email protected] | ||
expires: "2021-08-01" | ||
framework_start_error: | ||
disabled: true | ||
send_in_pings: | ||
- startup-timeline | ||
type: boolean | ||
description: | | ||
An error when attempting to record `framework_primary/secondary` - 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#pullrequestreview-394228626 | ||
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068 | ||
data_sensitivity: | ||
- technical | ||
notification_emails: | ||
- [email protected] | ||
- [email protected] | ||
expires: "2021-08-01" | ||
framework_start_read_error: | ||
disabled: true | ||
send_in_pings: | ||
- startup-timeline | ||
type: boolean | ||
description: | | ||
An error when attempting to read stats from /proc pseudo-filesystem - | ||
privacy managers can block access to reading these files - | ||
the application will catch a file reading exception. | ||
bugs: | ||
- https://github.com/mozilla-mobile/fenix/issues/10434 | ||
data_reviews: | ||
- https://github.com/mozilla-mobile/fenix/pull/10481 | ||
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068 | ||
data_sensitivity: | ||
- technical | ||
notification_emails: | ||
- [email protected] | ||
- [email protected] | ||
expires: "2021-08-01" | ||
clock_ticks_per_second_v2: | ||
disabled: true | ||
send_in_pings: | ||
- startup-timeline | ||
type: quantity | ||
unit: clock ticks per second | ||
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_primary/secondary` metrics. | ||
bugs: | ||
- https://github.com/mozilla-mobile/fenix/issues/8803 | ||
- https://github.com/mozilla-mobile/fenix/issues/18157 | ||
data_reviews: | ||
- https://github.com/mozilla-mobile/fenix/pull/9788#pullrequestreview-394228626 | ||
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068 | ||
- https://github.com/mozilla-mobile/fenix/pull/18158#issue-579593943 | ||
data_sensitivity: | ||
- technical | ||
notification_emails: | ||
- [email protected] | ||
- [email protected] | ||
expires: "2021-08-01" | ||
|
||
perf.startup: | ||
cold_main_app_to_first_frame: | ||
type: timing_distribution | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,24 +30,3 @@ first-session: | |
- https://github.com/mozilla-mobile/fenix/pull/8074#issuecomment-586512202 | ||
notification_emails: | ||
- [email protected] | ||
|
||
startup-timeline: | ||
description: | | ||
This ping is intended to provide an understanding of startup performance. | ||
In addition to being captured on real devices, the ping data was prematurely | ||
optimized into this separate ping to be isolated from other metrics to be | ||
more easily captured by performance testing automation but that hasn't | ||
happened in practice. We would have removed it but implementation | ||
details don't make that possible: | ||
https://github.com/mozilla-mobile/fenix/issues/17972#issuecomment-781002987 | ||
include_client_id: true | ||
bugs: | ||
- https://github.com/mozilla-mobile/fenix/issues/8803 | ||
- https://github.com/mozilla-mobile/fenix/issues/17972 | ||
data_reviews: | ||
- https://github.com/mozilla-mobile/fenix/pull/9788#pullrequestreview-394228626 | ||
- https://github.com/mozilla-mobile/fenix/pull/18043#issue-575389284 | ||
notification_emails: | ||
- [email protected] | ||
- [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
app/src/main/java/org/mozilla/fenix/perf/ApplicationInitTimeContainer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package org.mozilla.fenix.perf | ||
|
||
import android.os.SystemClock | ||
|
||
/** | ||
* A class to store the application initialization time. | ||
* Time is stores in elapsed real time nano seconds | ||
*/ | ||
internal class ApplicationInitTimeContainer( | ||
private val getElapsedRealtimeNanos: () -> Long = SystemClock::elapsedRealtimeNanos | ||
) { | ||
|
||
var applicationInitNanos = -1L | ||
private set | ||
private var isApplicationInitCalled = false | ||
|
||
fun onApplicationInit() { | ||
// This gets called from multiple processes: don't do anything expensive. See call site for details. | ||
// | ||
// In the main process, there are multiple Application impl so we ensure it's only set by | ||
// the first one. | ||
if (!isApplicationInitCalled) { | ||
isApplicationInitCalled = true | ||
applicationInitNanos = getElapsedRealtimeNanos() | ||
} | ||
} | ||
} |
107 changes: 0 additions & 107 deletions
107
app/src/main/java/org/mozilla/fenix/perf/StartupFrameworkStartMeasurement.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.