зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1797631 - Removing the code implemented for the new metric capture experiment ping. Reverts back to previous state. chutten r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D160423
This commit is contained in:
Родитель
8827830197
Коммит
36a12fbee2
|
@ -39,7 +39,6 @@ browser.engagement:
|
|||
send_in_pings:
|
||||
- baseline
|
||||
- metrics
|
||||
- new-metric-capture-emulation
|
||||
no_lint:
|
||||
- BASELINE_PING
|
||||
|
||||
|
@ -68,6 +67,5 @@ browser.engagement:
|
|||
send_in_pings:
|
||||
- baseline
|
||||
- metrics
|
||||
- new-metric-capture-emulation
|
||||
no_lint:
|
||||
- BASELINE_PING
|
||||
|
|
|
@ -92,7 +92,6 @@ wr:
|
|||
send_in_pings:
|
||||
- metrics
|
||||
- pseudo-main
|
||||
- new-metric-capture-emulation
|
||||
renderer_time_no_sc:
|
||||
type: timing_distribution
|
||||
description: >
|
||||
|
|
|
@ -34,8 +34,6 @@ impl UserActivityObserver {
|
|||
// First and foremost, even if we can't get the ObserverService,
|
||||
// init always means client activity.
|
||||
glean::handle_client_active();
|
||||
// send emulation ping at startup
|
||||
glean::submit_ping_by_name("new-metric-capture-emulation", Some("active"));
|
||||
|
||||
// SAFETY: Everything here is self-contained.
|
||||
//
|
||||
|
@ -98,7 +96,6 @@ impl UserActivityObserver {
|
|||
inactivity.as_secs()
|
||||
);
|
||||
glean::handle_client_active();
|
||||
glean::submit_ping_by_name("new-metric-capture-emulation", Some("active"));
|
||||
}
|
||||
let mut edge = self.last_edge.write().expect("Edge lock poisoned.");
|
||||
*edge = Instant::now();
|
||||
|
@ -123,7 +120,6 @@ impl UserActivityObserver {
|
|||
activity.as_secs()
|
||||
);
|
||||
glean::handle_client_inactive();
|
||||
glean::submit_ping_by_name("new-metric-capture-emulation", Some("inactive"));
|
||||
}
|
||||
let mut edge = self.last_edge.write().expect("Edge lock poisoned.");
|
||||
*edge = Instant::now();
|
||||
|
|
|
@ -33,25 +33,3 @@ pseudo-main:
|
|||
notification_emails:
|
||||
- chutten@mozilla.com
|
||||
- glean-team@mozilla.com
|
||||
new-metric-capture-emulation:
|
||||
description: |
|
||||
Experimental ping to emulate the capture of new measures
|
||||
that would usually be collected in the metrics ping,
|
||||
to see if it would speed up measure completeness.
|
||||
Sends only EXISTING measures.
|
||||
reasons:
|
||||
active: |
|
||||
Submitted when application is marked active,
|
||||
when started, or when a user interacts with
|
||||
Firefox after a 20min period of inactivity
|
||||
inactive: |
|
||||
Submitted when the user stops interacting with
|
||||
Firefox after 20min of activity.
|
||||
include_client_id: true
|
||||
notification_emails:
|
||||
- pmcmanis@mozilla.com
|
||||
- glean-team@mozilla.com
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1791000
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1791000#c2
|
||||
|
|
|
@ -29,4 +29,3 @@ FOG_BACKGROUND_UPDATE_PING = FOGDocTypePingFilter("background-update")
|
|||
FOG_BASELINE_PING = FOGDocTypePingFilter("baseline")
|
||||
FOG_DELETION_REQUEST_PING = FOGDocTypePingFilter("deletion-request")
|
||||
FOG_ONE_PING_ONLY_PING = FOGDocTypePingFilter("one-ping-only")
|
||||
FOG_NODC_PING = FOGDocTypePingFilter("new-metric-capture-emulation")
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
# 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/.
|
||||
|
||||
from telemetry_harness.fog_ping_filters import FOG_NODC_PING
|
||||
from telemetry_harness.fog_testcase import FOGTestCase
|
||||
|
||||
|
||||
class TestNewMetricCaptureEmulation(FOGTestCase):
|
||||
"""Test for the New Metric Capture Emulation Ping (aka NODC)"""
|
||||
|
||||
@staticmethod
|
||||
def user_active(active, marionette):
|
||||
script = (
|
||||
"Services.obs.notifyObservers(null, 'user-interaction-{}active')".format(
|
||||
"" if active else "in"
|
||||
)
|
||||
)
|
||||
with marionette.using_context(marionette.CONTEXT_CHROME):
|
||||
marionette.execute_script(script)
|
||||
|
||||
def test_user_activity(self):
|
||||
# tests send on active, inactive and restart
|
||||
with self.marionette.using_context(self.marionette.CONTEXT_CHROME):
|
||||
zero_prefs_script = """\
|
||||
Services.prefs.setIntPref("telemetry.fog.test.inactivity_limit", 0);
|
||||
Services.prefs.setIntPref("telemetry.fog.test.activity_limit", 0);
|
||||
"""
|
||||
self.marionette.execute_script(zero_prefs_script)
|
||||
|
||||
active_ping = self.wait_for_ping(
|
||||
lambda: self.user_active(True, self.marionette),
|
||||
FOG_NODC_PING,
|
||||
ping_server=self.fog_ping_server,
|
||||
)
|
||||
|
||||
inactive_ping = self.wait_for_ping(
|
||||
lambda: self.user_active(False, self.marionette),
|
||||
FOG_NODC_PING,
|
||||
ping_server=self.fog_ping_server,
|
||||
)
|
||||
|
||||
self.assertEqual("active", active_ping["payload"]["ping_info"]["reason"])
|
||||
self.assertEqual("inactive", inactive_ping["payload"]["ping_info"]["reason"])
|
||||
|
||||
# Restarting the browser sends the experiment ping with
|
||||
# reason "active". One should be sent with this reason on initialization
|
||||
# of FOG, the same way it would for baseline. This has to go last.
|
||||
|
||||
fog_init_ping = self.wait_for_ping(
|
||||
self.restart_browser, FOG_NODC_PING, ping_server=self.fog_ping_server
|
||||
)
|
||||
self.assertEqual("active", fog_init_ping["payload"]["ping_info"]["reason"])
|
||||
return
|
Загрузка…
Ссылка в новой задаче