Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Made JsonMap look at nested map values to make everything type safe f…

…or Pig
  • Loading branch information...
commit 03740c8cb17cc3d9589007f8aa7cf9a381da4119 1 parent 02a331a
@xstevens xstevens authored
View
2  src/main/java/com/mozilla/pig/eval/ConvertMapToBag.java
@@ -33,13 +33,13 @@
private static BagFactory bagFactory = BagFactory.getInstance();
private static TupleFactory tupleFactory = TupleFactory.getInstance();
+ @SuppressWarnings("unchecked")
@Override
public DataBag exec(Tuple input) throws IOException {
if (input == null || input.size() == 0) {
return null;
}
- @SuppressWarnings("unchecked")
Map<Object,Object> m = (Map<Object,Object>)input.get(0);
DataBag output = bagFactory.newDefaultBag();
View
38 src/main/java/com/mozilla/pig/eval/json/JsonMap.java
@@ -66,28 +66,38 @@ private DataBag convertListToBag(List<Object> l) {
return dbag;
}
-
+
+ /**
+ * Convert map and its values to types that Pig can handle
+ * @param m
+ * @return
+ */
@SuppressWarnings("unchecked")
+ private Map<String,Object> makeSafe(Map<String,Object> m) {
+ Map<String,Object> safeValues = new HashMap<String,Object>();
+ for (Map.Entry<String, Object> entry : m.entrySet()) {
+ Object v = entry.getValue();
+ if (v != null && v instanceof List) {
+ DataBag db = convertListToBag((List<Object>)v);
+ safeValues.put(entry.getKey(), db);
+ } else if (v != null && v instanceof Map) {
+ safeValues.put(entry.getKey(), makeSafe((Map<String,Object>)v));
+ } else {
+ safeValues.put(entry.getKey(), entry.getValue());
+ }
+ }
+
+ return safeValues;
+ }
+
public Map<String, Object> exec(Tuple input) throws IOException {
if (input == null || input.size() == 0) {
return null;
}
try {
- reporter.progress();
Map<String,Object> values = jsonMapper.readValue((String)input.get(0), new TypeReference<Map<String,Object>>() { });
- Map<String,Object> safeValues = new HashMap<String,Object>();
- for (Map.Entry<String, Object> entry : values.entrySet()) {
- Object v = entry.getValue();
- if (v != null && v instanceof List) {
- DataBag db = convertListToBag((List<Object>)v);
- safeValues.put(entry.getKey(), db);
- } else {
- safeValues.put(entry.getKey(), entry.getValue());
- }
- }
-
- return safeValues;
+ return makeSafe(values);
} catch(JsonParseException e) {
pigLogger.warn(this, "JSON Parse Error", ERRORS.JSONParseError);
} catch(JsonMappingException e) {
View
27 src/main/java/com/mozilla/pig/filter/map/ContainsKey.java
@@ -0,0 +1,27 @@
+package com.mozilla.pig.filter.map;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.pig.FilterFunc;
+import org.apache.pig.data.Tuple;
+
+/**
+ * Determines if the given map has contains the given key
+ */
+public class ContainsKey extends FilterFunc {
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Boolean exec(Tuple input) throws IOException {
+ if (input == null || input.size() < 2) {
+ return false;
+ }
+
+ Map m = (Map)input.get(0);
+ Object k = input.get(1);
+
+ return m.containsKey(k);
+ }
+
+}
View
47 src/main/java/com/mozilla/telemetry/pig/eval/HistogramValueTuples.java
@@ -0,0 +1,47 @@
+package com.mozilla.telemetry.pig.eval;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.pig.EvalFunc;
+import org.apache.pig.data.BagFactory;
+import org.apache.pig.data.DataBag;
+import org.apache.pig.data.Tuple;
+import org.apache.pig.data.TupleFactory;
+
+public class HistogramValueTuples extends EvalFunc<DataBag> {
+
+ private static BagFactory bagFactory = BagFactory.getInstance();
+ private static TupleFactory tupleFactory = TupleFactory.getInstance();
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public DataBag exec(Tuple input) throws IOException {
+ if (input == null || input.size() == 0) {
+ return null;
+ }
+
+ DataBag output = bagFactory.newDefaultBag();
+ Map<String,Map<String,Map<String,Object>>> m = (Map<String,Map<String,Map<String,Object>>>)input.get(0);
+ if (m != null) {
+ for (Map.Entry<String, Map<String,Map<String,Object>>> hist : m.entrySet()) {
+ Map<String,Map<String,Object>> hv = hist.getValue();
+ if (hv != null) {
+ Map<String,Object> values = hv.get("values");
+ if (values != null) {
+ for (Map.Entry<String, Object> v : values.entrySet()) {
+ Tuple t = tupleFactory.newTuple(3);
+ t.set(0, hist.getKey());
+ t.set(1, v.getKey());
+ t.set(2, v.getValue());
+ output.add(t);
+ }
+ }
+ }
+ }
+ }
+
+ return output;
+ }
+
+}
View
63 src/test/java/com/mozilla/pig/eval/json/JsonMapTest.java
@@ -0,0 +1,63 @@
+package com.mozilla.pig.eval.json;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.pig.data.DataBag;
+import org.apache.pig.data.Tuple;
+import org.apache.pig.data.TupleFactory;
+import org.junit.Test;
+
+import com.mozilla.telemetry.pig.eval.HistogramValueTuples;
+
+public class JsonMapTest {
+
+ private JsonMap jsonMap = new JsonMap();
+ private TupleFactory tupleFactory = TupleFactory.getInstance();
+
+ private String readFile(String file) throws IOException {
+ StringBuilder sb = new StringBuilder();
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
+ String line = null;
+ while ((line = reader.readLine()) != null) {
+ sb.append(line);
+ }
+ } finally {
+ if (reader != null) {
+ reader.close();
+ }
+ }
+
+ return sb.toString();
+ }
+
+ @Test
+ public void testExec1() throws IOException {
+ Tuple input = tupleFactory.newTuple();
+ input.append("{ \"foo\": \"bar\" }");
+ Map<String,Object> myMap = jsonMap.exec(input);
+ assertTrue(myMap.containsKey("foo"));
+ assertEquals(myMap.get("foo"), "bar");
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void testExec2() throws IOException {
+ Tuple input = tupleFactory.newTuple();
+ input.append(readFile(System.getProperty("basedir") + "/src/test/resources/telemetry.js"));
+ Map<String,Object> myMap = jsonMap.exec(input);
+ Map<String,Object> histograms = (Map<String,Object>)myMap.get("histograms");
+
+ assertTrue(histograms.containsKey("MOZ_SQLITE_OTHER_SYNC_MAIN_THREAD_MS"));
+ }
+
+}
View
811 src/test/resources/telemetry.js
@@ -0,0 +1,811 @@
+{
+ "ver": 1,
+ "info": {
+ "reason": "idle-daily",
+ "OS": "Darwin",
+ "appID": "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}",
+ "appVersion": "8.0a1",
+ "appName": "Firefox",
+ "appBuildID": "20110809030751",
+ "platformBuildID": "20110809030751",
+ "locale": "ja",
+ "cpucount": 2,
+ "memsize": 3840,
+ "arch": "x86-64",
+ "version": "11.0.0"
+ },
+ "simpleMeasurements": {
+ "uptime": 6,
+ "main": 364,
+ "firstPaint": 1702,
+ "sessionRestored": 1901,
+ "js": {
+ "e4x": 0,
+ "setProto": 0,
+ "customIter": 0
+ }
+ },
+ "histograms": {
+ "CYCLE_COLLECTOR": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "8": 0,
+ "10": 1,
+ "20": 1,
+ "29": 1,
+ "34": 0
+ },
+ "sum": 64
+ },
+ "CYCLE_COLLECTOR_COLLECTED": {
+ "range": [1, 100000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "76": 0,
+ "95": 1,
+ "119": 1,
+ "186": 1,
+ "233": 0
+ },
+ "sum": 467
+ },
+ "CYCLE_COLLECTOR_VISITED_GCED": {
+ "range": [1, 300000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "1988": 0,
+ "2555": 2,
+ "4219": 1,
+ "5422": 0
+ },
+ "sum": 10669
+ },
+ "CYCLE_COLLECTOR_VISITED_REF_COUNTED": {
+ "range": [1, 300000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "5422": 0,
+ "6968": 1,
+ "19005": 1,
+ "24423": 1,
+ "31386": 0
+ },
+ "sum": 52538
+ },
+ "EARLY_GLUESTARTUP_HARD_FAULTS": {
+ "range": [1, 100],
+ "bucket_count": 12,
+ "histogram_type": 1,
+ "values": {
+ "0": 0,
+ "1": 1,
+ "11": 0
+ },
+ "sum": 4
+ },
+ "FIND_PLUGINS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "1": 0,
+ "3": 1,
+ "8": 0
+ },
+ "sum": 7
+ },
+ "GLUESTARTUP_HARD_FAULTS": {
+ "range": [1, 500],
+ "bucket_count": 12,
+ "histogram_type": 0,
+ "values": {
+ "81": 0,
+ "149": 1,
+ "273": 0
+ },
+ "sum": 248
+ },
+ "HTTP_PAGE_COMPLETE_LOAD": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "48": 0,
+ "57": 1,
+ "10000": 1
+ },
+ "sum": 12791
+ },
+ "HTTP_PAGE_COMPLETE_LOAD_NET": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "48": 0,
+ "57": 1,
+ "10000": 1
+ },
+ "sum": 12791
+ },
+ "HTTP_PAGE_DNS_ISSUE_TIME": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "0": 2,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "HTTP_PAGE_DNS_LOOKUP_TIME": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "0": 2,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "HTTP_PAGE_FIRST_SENT_TO_LAST_RECEIVED": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "48": 0,
+ "57": 1,
+ "10000": 1
+ },
+ "sum": 12774
+ },
+ "HTTP_PAGE_OPEN_TO_FIRST_RECEIVED": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "48": 0,
+ "57": 1,
+ "10000": 1
+ },
+ "sum": 12712
+ },
+ "HTTP_PAGE_OPEN_TO_FIRST_SENT": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "0": 1,
+ "14": 1,
+ "17": 0
+ },
+ "sum": 15
+ },
+ "HTTP_PAGE_TCP_CONNECTION": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "1": 0,
+ "2": 1,
+ "3": 0
+ },
+ "sum": 2
+ },
+ "HTTP_REQUEST_PER_PAGE": {
+ "range": [1, 1000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "0": 1,
+ "8": 1,
+ "9": 0
+ },
+ "sum": 8
+ },
+ "HTTP_REQUEST_PER_PAGE_FROM_CACHE": {
+ "range": [1, 101],
+ "bucket_count": 102,
+ "histogram_type": 1,
+ "values": {
+ "86": 0,
+ "87": 1,
+ "88": 0
+ },
+ "sum": 87
+ },
+ "HTTP_SUBITEM_FIRST_BYTE_LATENCY_TIME": {
+ "range": [1, 30000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "9104": 0,
+ "11106": 1,
+ "13548": 0
+ },
+ "sum": 12648
+ },
+ "HTTP_SUBITEM_OPEN_LATENCY_TIME": {
+ "range": [1, 30000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "0": 0,
+ "1": 1,
+ "11106": 3,
+ "13548": 4,
+ "16527": 0
+ },
+ "sum": 92394
+ },
+ "HTTP_SUB_CACHE_READ_TIME": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "1": 0,
+ "2": 3,
+ "4": 1,
+ "12": 1,
+ "135": 2,
+ "160": 0
+ },
+ "sum": 306
+ },
+ "HTTP_SUB_COMPLETE_LOAD": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "2": 0,
+ "3": 1,
+ "34": 1,
+ "48": 1,
+ "57": 1,
+ "68": 1,
+ "190": 2,
+ "10000": 1
+ },
+ "sum": 13337
+ },
+ "HTTP_SUB_COMPLETE_LOAD_CACHED": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "2": 0,
+ "3": 1,
+ "34": 1,
+ "48": 1,
+ "57": 1,
+ "68": 1,
+ "190": 2,
+ "226": 0
+ },
+ "sum": 611
+ },
+ "HTTP_SUB_COMPLETE_LOAD_NET": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "8416": 0,
+ "10000": 1
+ },
+ "sum": 12726
+ },
+ "HTTP_SUB_DNS_ISSUE_TIME": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "0": 1,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "HTTP_SUB_DNS_LOOKUP_TIME": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "0": 1,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "HTTP_SUB_FIRST_SENT_TO_LAST_RECEIVED": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "8416": 0,
+ "10000": 1
+ },
+ "sum": 12710
+ },
+ "HTTP_SUB_OPEN_TO_FIRST_FROM_CACHE": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "0": 0,
+ "1": 1,
+ "34": 2,
+ "48": 3,
+ "68": 1,
+ "81": 0
+ },
+ "sum": 303
+ },
+ "HTTP_SUB_OPEN_TO_FIRST_RECEIVED": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "8416": 0,
+ "10000": 1
+ },
+ "sum": 12647
+ },
+ "HTTP_SUB_OPEN_TO_FIRST_SENT": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "12": 0,
+ "14": 1,
+ "17": 0
+ },
+ "sum": 15
+ },
+ "HTTP_SUB_TCP_CONNECTION": {
+ "range": [1, 10000],
+ "bucket_count": 50,
+ "histogram_type": 0,
+ "values": {
+ "1": 0,
+ "2": 1,
+ "3": 0
+ },
+ "sum": 2
+ },
+ "IMAGE_DECODE_LATENCY": {
+ "range": [50, 5000000],
+ "bucket_count": 100,
+ "histogram_type": 0,
+ "values": {
+ "0": 3,
+ "50": 1,
+ "63": 1,
+ "80": 1,
+ "114": 1,
+ "128": 2,
+ "144": 2,
+ "162": 1,
+ "182": 2,
+ "205": 3,
+ "369": 1,
+ "1511": 2,
+ "2417": 1,
+ "2718": 0
+ },
+ "sum": 8186
+ },
+ "IMAGE_DECODE_TIME": {
+ "range": [50, 50000000],
+ "bucket_count": 100,
+ "histogram_type": 0,
+ "values": {
+ "0": 1,
+ "50": 1,
+ "58": 1,
+ "77": 1,
+ "117": 2,
+ "135": 1,
+ "155": 3,
+ "178": 2,
+ "205": 3,
+ "360": 1,
+ "1474": 2,
+ "2250": 1,
+ "2591": 0
+ },
+ "sum": 8186
+ },
+ "MAC_INITFONTLIST_TOTAL": {
+ "range": [1, 30000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "14": 0,
+ "50": 1,
+ "180": 0
+ },
+ "sum": 67
+ },
+ "MEMORY_EXPLICIT": {
+ "range": [1024, 1048576],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "32766": 0,
+ "77932": 3,
+ "185358": 0
+ },
+ "sum": 323214
+ },
+ "MEMORY_HEAP_ALLOCATED": {
+ "range": [1024, 1048576],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "32766": 0,
+ "77932": 3,
+ "185358": 0
+ },
+ "sum": 264796
+ },
+ "MEMORY_JS_GC_HEAP": {
+ "range": [1024, 524288],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "2233": 0,
+ "4870": 3,
+ "10622": 0
+ },
+ "sum": 30720
+ },
+ "MEMORY_RESIDENT": {
+ "range": [32768, 1048576],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "77936": 0,
+ "120194": 3,
+ "185364": 0
+ },
+ "sum": 511548
+ },
+ "MOZ_SQLITE_COOKIES_READ_B": {
+ "range": [1, 32768],
+ "bucket_count": 3,
+ "histogram_type": 1,
+ "values": {
+ "0": 0,
+ "1": 2,
+ "32768": 25
+ },
+ "sum": 819400
+ },
+ "MOZ_SQLITE_COOKIES_READ_MAIN_THREAD_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 8,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "MOZ_SQLITE_COOKIES_READ_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 19,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "MOZ_SQLITE_COOKIES_WRITE_B": {
+ "range": [1, 32768],
+ "bucket_count": 3,
+ "histogram_type": 1,
+ "values": {
+ "0": 0,
+ "1": 12,
+ "32768": 11
+ },
+ "sum": 360744
+ },
+ "MOZ_SQLITE_COOKIES_WRITE_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 23,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "MOZ_SQLITE_OPEN_MAIN_THREAD_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 29,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "MOZ_SQLITE_OPEN_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 35,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "MOZ_SQLITE_OTHER_READ_B": {
+ "range": [1, 32768],
+ "bucket_count": 3,
+ "histogram_type": 1,
+ "values": {
+ "0": 0,
+ "1": 59,
+ "32768": 31
+ },
+ "sum": 1017592
+ },
+ "MOZ_SQLITE_OTHER_READ_MAIN_THREAD_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 77,
+ "1": 3,
+ "3": 0
+ },
+ "sum": 4
+ },
+ "MOZ_SQLITE_OTHER_READ_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 14,
+ "1": 1,
+ "3": 0
+ },
+ "sum": 1
+ },
+ "MOZ_SQLITE_OTHER_SYNC_MAIN_THREAD_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 9,
+ "1": 1,
+ "3": 0
+ },
+ "sum": 2
+ },
+ "MOZ_SQLITE_OTHER_WRITE_B": {
+ "range": [1, 32768],
+ "bucket_count": 3,
+ "histogram_type": 1,
+ "values": {
+ "0": 0,
+ "1": 42,
+ "32768": 30
+ },
+ "sum": 986804
+ },
+ "MOZ_SQLITE_OTHER_WRITE_MAIN_THREAD_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 72,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "MOZ_SQLITE_PLACES_READ_B": {
+ "range": [1, 32768],
+ "bucket_count": 3,
+ "histogram_type": 1,
+ "values": {
+ "0": 0,
+ "1": 4,
+ "32768": 166
+ },
+ "sum": 5439888
+ },
+ "MOZ_SQLITE_PLACES_READ_MAIN_THREAD_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 90,
+ "1": 3,
+ "3": 0
+ },
+ "sum": 5
+ },
+ "MOZ_SQLITE_PLACES_READ_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 73,
+ "1": 4,
+ "3": 0
+ },
+ "sum": 6
+ },
+ "MOZ_SQLITE_PLACES_SYNC_MAIN_THREAD_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "1": 0,
+ "3": 3,
+ "8": 1,
+ "21": 0
+ },
+ "sum": 26
+ },
+ "MOZ_SQLITE_PLACES_WRITE_B": {
+ "range": [1, 32768],
+ "bucket_count": 3,
+ "histogram_type": 1,
+ "values": {
+ "0": 0,
+ "1": 57,
+ "32768": 97
+ },
+ "sum": 3179888
+ },
+ "MOZ_SQLITE_PLACES_WRITE_MAIN_THREAD_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 126,
+ "1": 1,
+ "3": 0
+ },
+ "sum": 1
+ },
+ "MOZ_SQLITE_PLACES_WRITE_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 27,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "MOZ_SQLITE_TRUNCATE_MAIN_THREAD_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 2,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "MOZ_SQLITE_TRUNCATE_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 2,
+ "1": 0
+ },
+ "sum": 0
+ },
+ "MOZ_SQLITE_URLCLASSIFIER_READ_B": {
+ "range": [1, 32768],
+ "bucket_count": 3,
+ "histogram_type": 1,
+ "values": {
+ "0": 0,
+ "1": 9,
+ "32768": 864
+ },
+ "sum": 28311780
+ },
+ "MOZ_SQLITE_URLCLASSIFIER_READ_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 843,
+ "1": 17,
+ "3": 13,
+ "8": 0
+ },
+ "sum": 84
+ },
+ "MOZ_SQLITE_URLCLASSIFIER_WRITE_B": {
+ "range": [1, 32768],
+ "bucket_count": 3,
+ "histogram_type": 1,
+ "values": {
+ "0": 0,
+ "1": 1716,
+ "32768": 1715
+ },
+ "sum": 56205000
+ },
+ "MOZ_SQLITE_URLCLASSIFIER_WRITE_MS": {
+ "range": [1, 3000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 3428,
+ "8": 3,
+ "21": 0
+ },
+ "sum": 28
+ },
+ "NETWORK_DISK_CACHE_OPEN": {
+ "range": [1, 10000],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "1": 0,
+ "3": 1,
+ "10": 0
+ },
+ "sum": 4
+ },
+ "PAGE_FAULTS_HARD": {
+ "range": [8, 65536],
+ "bucket_count": 13,
+ "histogram_type": 0,
+ "values": {
+ "0": 0,
+ "8": 1,
+ "41": 1,
+ "93": 0
+ },
+ "sum": 66
+ },
+ "PLACES_AUTOCOMPLETE_1ST_RESULT_TIME_MS": {
+ "range": [50, 500],
+ "bucket_count": 10,
+ "histogram_type": 0,
+ "values": {
+ "0": 0,
+ "50": 1,
+ "67": 1,
+ "89": 0
+ },
+ "sum": 144
+ },
+ "SHUTDOWN_OK": {
+ "range": [1, 2],
+ "bucket_count": 3,
+ "histogram_type": 2,
+ "values": {
+ "0": 0,
+ "1": 1,
+ "2": 0
+ },
+ "sum": 1
+ },
+ "TOTAL_CONTENT_PAGE_LOAD_TIME": {
+ "range": [100, 10000],
+ "bucket_count": 100,
+ "histogram_type": 0,
+ "values": {
+ "0": 1,
+ "10000": 1
+ },
+ "sum": 13874
+ }
+ }
+}

0 comments on commit 03740c8

Please sign in to comment.
Something went wrong with that request. Please try again.