Bug 878303 - Part 2: use COUNTED_DISCRETE type for searches. r=nalexander, a=lsblakk
authorRichard Newman <rnewman@mozilla.com>
Mon, 03 Jun 2013 14:12:00 -0700
changeset 142929 990c0e1d666bf8d7191b2feb7f562e8b3f798ec8
parent 142928 795a66deb9b9b1f2bb862b558819743b4db2d732
child 142930 01d641ffb1fe7486f1fd33ae1afe4df72069e100
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander, lsblakk
bugs878303
milestone23.0a2
Bug 878303 - Part 2: use COUNTED_DISCRETE type for searches. r=nalexander, a=lsblakk
mobile/android/base/health/BrowserHealthRecorder.java
--- a/mobile/android/base/health/BrowserHealthRecorder.java
+++ b/mobile/android/base/health/BrowserHealthRecorder.java
@@ -474,17 +474,17 @@ public class BrowserHealthRecorder imple
         }
     }
 
     /*
      * Searches.
      */
 
     public static final String MEASUREMENT_NAME_SEARCH_COUNTS = "org.mozilla.searches.counts";
-    public static final int MEASUREMENT_VERSION_SEARCH_COUNTS = 3;
+    public static final int MEASUREMENT_VERSION_SEARCH_COUNTS = 4;
 
     public static final String[] SEARCH_LOCATIONS = {
         "barkeyword",
         "barsuggest",
         "bartext",
     };
 
     // See services/healthreport/providers.jsm. Sorry for the duplication.
@@ -572,18 +572,19 @@ public class BrowserHealthRecorder imple
             new MeasurementFields() {
                 @Override
                 public Iterable<FieldSpec> getFields() {
                     ArrayList<FieldSpec> out = new ArrayList<FieldSpec>(SEARCH_LOCATIONS.length);
                     for (String location : SEARCH_LOCATIONS) {
                         // We're not using a counter, because the set of engine
                         // identifiers is potentially unbounded, and thus our
                         // measurement version would have to keep growing as
-                        // fields changed.
-                        out.add(new FieldSpec(location, Field.TYPE_STRING_DISCRETE));
+                        // fields changed. Instead we store discrete values, and
+                        // accumulate them into a counting map during processing.
+                        out.add(new FieldSpec(location, Field.TYPE_COUNTED_STRING_DISCRETE));
                     }
                     return out;
                 }
         });
 
         // Do this here, rather than in a centralized registration spot, in
         // case the above throws and we wind up handling events that we can't
         // store.