Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Multiple window and immersive mode time measurement telemetry. #3430

Merged
merged 5 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
279 changes: 270 additions & 9 deletions app/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
# 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/.


---
$schema: moz://mozilla.org/schemas/glean/metrics/1-0-0

distribution:
channel_name:
type: string
lifetime: application
description: >
The distribution channel name of this application. We use this field to recognize Firefox Reality
is distributed to which channels, such as wavevr, oculusvr, etc.
The distribution channel name of this application.
We use this field to recognize Firefox
Reality is distributed to which channels,
such as wavevrStore, oculusvr, picovr,etc.
send_in_pings:
- baseline
- events
- metrics
- session-end
Expand Down Expand Up @@ -154,7 +155,8 @@ firefox_account:
The user finishes the sign in flow
extra_keys:
state:
description: "The result of the sign in flow. True in case of success, false in case of error"
description: "The result of the sign in flow.
True in case of success, false in case of error"
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
Expand All @@ -167,7 +169,8 @@ firefox_account:
sign_out:
type: event
description: >
A user pressed the sign out button on the sync account page and was successfully signed out of FxA
A user pressed the sign out button on the sync account page
and was successfully signed out of FxA
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
Expand All @@ -181,7 +184,8 @@ firefox_account:
type: boolean
lifetime: application
description: >
Bookmarks sync engine status. True means that the bookmarks sync status is enabled, false otherwise.
Bookmarks sync engine status.
True means that the bookmarks sync status is enabled, false otherwise.
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
Expand All @@ -195,7 +199,8 @@ firefox_account:
type: boolean
lifetime: application
description: >
History sync engine status. True means that the history sync status is enabled, false otherwise.
History sync engine status.
True means that the history sync status is enabled, false otherwise.
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
Expand Down Expand Up @@ -261,7 +266,8 @@ legacy_telemetry:
type: uuid
description: >
A UUID uniquely identifying the legacy telemetry client id.
This is used for supporting legacy telemetry in the `deletion-request` ping.
This is used for supporting legacy telemetry in the `deletion-request`
ping.
send_in_pings:
- deletion-request
bugs:
Expand All @@ -272,3 +278,258 @@ legacy_telemetry:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"

pages:
page_load:
type: timing_distribution
description: >
Measuring how long each page takes to load.
time_unit: nanosecond
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"

immersive:
duration:
type: timing_distribution
description: >
Measuring if users use WebXR APIs to enter XR immersive mode.
How long they stay in this mode. (It starts from users call
`navigator.xr.requestSession()` and be ended when the XRSession calls
its `end()`.)
time_unit: microsecond
daoshengmu marked this conversation as resolved.
Show resolved Hide resolved
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"

windows:
duration:
type: timing_distribution
description: >
Measuring how long windows are kept open.
time_unit: millisecond
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
movement:
type: counter
description: >
Counting how many times of moving a window in a session.
send_in_pings:
- session-end
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
resize:
type: counter
description: >
Counting how many times of resizing a window in a session.
send_in_pings:
- session-end
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
active_in_left_time:
type: timing_distribution
description: >
In Firefox Reality, we allow maximum three windows be placed at front,
left, and right positions simultaneously. Using this metric to measure
how long the left side window is active in a session.
send_in_pings:
- session-end
time_unit: microsecond
daoshengmu marked this conversation as resolved.
Show resolved Hide resolved
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
active_in_right_time:
type: timing_distribution
description: >
In Firefox Reality, we allow maximum three windows be placed at front,
left, and right positions simultaneously. Using this metric to measure
how long the right side window is active in a session.
send_in_pings:
- session-end
time_unit: microsecond
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
active_in_front_time:
type: timing_distribution
description: >
In Firefox Reality, we allow maximum three windows be placed at front,
left, and right positions simultaneously. Using this metric to measure
how long the front side window is active in a session.
send_in_pings:
- session-end
time_unit: microsecond
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
single_window_opened_time:
type: timing_distribution
description: >
Measuring how long a user uses single window in a session.
send_in_pings:
- session-end
time_unit: microsecond
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
double_window_opened_time:
type: timing_distribution
description: >
Measuring how long a user uses double windows in a session.
send_in_pings:
- session-end
time_unit: microsecond
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
triple_window_opened_time:
type: timing_distribution
description: >
Measuring how long a user uses triple windows in a session.
send_in_pings:
- session-end
time_unit: microsecond
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
single_pri_window_opened_time:
type: timing_distribution
description: >
Measuring how long a user uses single private window in a session.
send_in_pings:
- session-end
time_unit: microsecond
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
double_pri_window_opened_time:
type: timing_distribution
description: >
Measuring how long a user uses double private windows in a session.
send_in_pings:
- session-end
time_unit: microsecond
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
triple_pri_window_opened_time:
type: timing_distribution
description: >
Measuring how long a user uses triple private windows in a session.
send_in_pings:
- session-end
time_unit: microsecond
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2279
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
opened_window_count:
type: labeled_counter
description: >
Counting which multiple window mode (single, double, triple)
users are using in a session.
send_in_pings:
- session-end
labels:
- single
- double
- triple
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2230
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
opened_pri_window_count:
type: labeled_counter
description: >
Counting which multiple private window mode (single, double, triple)
users are using in a session.
send_in_pings:
- session-end
labels:
- single
- double
- triple
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2230
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166
notification_emails:
- fxr-telemetry@mozilla.com
- dmu@mozilla.com
expires: "2020-11-01"
6 changes: 4 additions & 2 deletions app/pings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
# 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/.

---
$schema: moz://mozilla.org/schemas/glean/pings/1-0-0

session-end:
description: >
This ping is sent at the end of a session (when Firefox Reality switches to the background).
We usually send search and UI control metrics at the end of a session.
This ping is sent at the end of a session (when Firefox Reality
switches to the background). We usually send search and UI control
metrics at the end of a session.
include_client_id: true
bugs:
- https://github.com/MozillaReality/FirefoxReality/issues/2230
Expand Down
8 changes: 5 additions & 3 deletions app/src/common/shared/org/mozilla/vrbrowser/browser/Places.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ class Places(var context: Context) {
val files = context.filesDir.listFiles { _, name ->
name.matches("places\\.sqlite.*".toRegex())
}
for (file in files) {
if (!file.delete()) {
Logger(LOGTAG).debug("Can't remove " + file.absolutePath)
if (files != null) {
for (file in files) {
if (!file.delete()) {
Logger(LOGTAG).debug("Can't remove " + file.absolutePath)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ public void onPageStart(@NonNull GeckoSession aSession, @NonNull String aUri) {
Log.d(LOGTAG, "Session onPageStart");
mState.mIsLoading = true;
TelemetryWrapper.startPageLoadTime();
GleanMetricsService.startPageLoadTime();
GleanMetricsService.startPageLoadTime(aUri);

setWebXRState(SessionState.WEBXR_UNUSED);
for (GeckoSession.ProgressDelegate listener : mProgressListeners) {
Expand Down
Loading