Bug 1467705 - Pack GeckoView histograms using TelemetryUtils. r=esawin
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Fri, 08 Jun 2018 20:09:19 +0200
changeset 422603 bde911a9320ae5844f01f558ffc3670d5c0fe24d
parent 422602 fc7a9042ec08b85734714d4f7bffb4e34ca0dd85
child 422604 915699f04f0359b1cea589763f429097c5d7adbf
push id65208
push useralessio.placitelli@gmail.com
push dateFri, 15 Jun 2018 00:42:30 +0000
treeherderautoland@915699f04f03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersesawin
bugs1467705
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1467705 - Pack GeckoView histograms using TelemetryUtils. r=esawin Firefox Desktop uses a sparse representation for histograms and the pipeline expects them to be this way. This patch makes sure the GeckoView API returns packed histograms and keyed histograms. MozReview-Commit-ID: 3j4HdfASTSO
toolkit/components/telemetry/geckoview/GeckoViewTelemetryController.jsm
--- a/toolkit/components/telemetry/geckoview/GeckoViewTelemetryController.jsm
+++ b/toolkit/components/telemetry/geckoview/GeckoViewTelemetryController.jsm
@@ -88,25 +88,30 @@ const GeckoViewTelemetryController = {
   retrieveSnapshots(aClear, aCallback) {
     debug `retrieveSnapshots`;
 
     // Selecting the opt-in dataset will ensure that we retrieve opt-in probes
     // (iff canRecordPreRelease == true) and opt-out probes
     // (iff canRecordRelease == true) if they are being recorded.
     const dataset = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN;
 
+    const rawHistograms = Services.telemetry.snapshotHistograms(dataset,
+                                                                /* subsession */ false,
+                                                                /* clear */ false);
+    const rawKeyedHistograms =
+      Services.telemetry.snapshotKeyedHistograms(dataset, /* subsession */ false,
+                                                 /* clear */ false);
+    const scalars = Services.telemetry.snapshotScalars(dataset, /* clear */ false);
+    const keyedScalars = Services.telemetry.snapshotKeyedScalars(dataset, /* clear */ false);
+
     const snapshots = {
-      histograms: Services.telemetry.snapshotHistograms(
-                      dataset, /* subsession */ false, /* clear */ false),
-      keyedHistograms: Services.telemetry.snapshotKeyedHistograms(
-                           dataset, /* subsession */ false, /* clear */ false),
-      scalars: Services.telemetry.snapshotScalars(
-                   dataset, /* clear */ false),
-      keyedScalars: Services.telemetry.snapshotKeyedScalars(
-                        dataset, /* clear */ false),
+      histograms: TelemetryUtils.packHistograms(rawHistograms),
+      keyedHistograms: TelemetryUtils.packKeyedHistograms(rawKeyedHistograms),
+      scalars,
+      keyedScalars,
     };
 
     if (!snapshots.histograms || !snapshots.keyedHistograms ||
         !snapshots.scalars || !snapshots.keyedScalars) {
       aCallback.onError(`Failed retrieving snapshots!`);
       return;
     }