Bug 878303 - Part 2: use COUNTED_DISCRETE type for searches. r=nalexander
authorRichard Newman <rnewman@mozilla.com>
Mon, 03 Jun 2013 14:12:00 -0700
changeset 134128 5ccd0592e074a249595230c7b964727afec6df01
parent 134127 a31f790f06814d1faa6289577292ace90a2a5c0b
child 134129 30fe681b27bea80b484fc0b8e70928246eed4f2f
push id29067
push userryanvm@gmail.com
push dateWed, 05 Jun 2013 20:37:20 +0000
treeherdermozilla-inbound@72fbfb2f8e51 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs878303
milestone24.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 878303 - Part 2: use COUNTED_DISCRETE type for searches. r=nalexander
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.