Bug 1382556 - Fix loading the whitelist file from histogram_tools.py. r=chutten
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Thu, 20 Jul 2017 01:55:00 +0200
changeset 369873 4ff87819abe8f08ca86c3ca81c39cfcdb338ad57
parent 369872 e3d08055513a9a005be9165279789b68a9e62ba6
child 369874 4194f4a318defa521543768acf09e19efba899ac
push id92763
push useralessio.placitelli@gmail.com
push dateThu, 20 Jul 2017 12:54:10 +0000
treeherdermozilla-inbound@4194f4a318de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1382556
milestone56.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 1382556 - Fix loading the whitelist file from histogram_tools.py. r=chutten This also fixes all the histogram definitions that landed while the whitelist was broken.
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/histogram-whitelists.json
toolkit/components/telemetry/histogram_tools.py
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -852,16 +852,17 @@
   },
   "CYCLE_COLLECTOR_SLICE_DURING_IDLE": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
     "expires_in_version": "62",
     "kind": "linear",
     "high": 100,
     "n_buckets": 50,
+    "bug_numbers": [1372042],
     "description": "Percent of cycle collector slice done during idle time"
   },
   "DEFERRED_FINALIZE_ASYNC": {
     "record_in_processes": ["main", "content"],
     "expires_in_version": "never",
     "kind": "exponential",
     "high": 10000,
     "n_buckets": 50,
@@ -917,16 +918,17 @@
   },
   "FORGET_SKIPPABLE_DURING_IDLE": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
     "expires_in_version": "62",
     "kind": "linear",
     "high": 100,
     "n_buckets": 50,
+    "bug_numbers": [1372042],
     "description": "Percent of the cycle collector's forget skippable done during idle time"
   },
   "FULLSCREEN_TRANSITION_BLACK_MS": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["xquan@mozilla.com"],
     "expires_in_version": "never",
     "kind": "exponential",
     "low": 100,
@@ -1192,25 +1194,27 @@
   },
   "GC_SLICE_DURING_IDLE": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
     "expires_in_version": "62",
     "kind": "linear",
     "high": 100,
     "n_buckets": 50,
+    "bug_numbers": [1372042],
     "description": "Percent of GC slice done during idle time"
   },
   "GC_BUDGET_OVERRUN": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org", "jcoppeard@mozilla.com"],
     "expires_in_version": "never",
     "kind": "exponential",
     "high": 100000,
     "n_buckets": 100,
+    "bug_numbers": [1381777],
     "description": "How long a GC slice ran over its budget in microseconds"
   },
   "GEOLOCATION_ACCURACY_EXPONENTIAL": {
     "record_in_processes": ["main", "content"],
     "expires_in_version": "default",
     "kind": "exponential",
     "high": 100000,
     "n_buckets": 50,
@@ -5065,16 +5069,17 @@
   },
   "PLACES_DATABASE_CORRUPTION_HANDLING_STAGE": {
     "record_in_processes": ["main"],
     "alert_emails": ["firefox-dev@mozilla.org"],
     "expires_in_version": "never",
     "kind": "enumerated",
     "n_values": 6,
     "releaseChannelCollection": "opt-out",
+    "bug_numbers": [1356812],
     "description": "PLACES: stage reached when trying to fix a database corruption , see Places::Database::eCorruptDBReplaceStatus"
   },
   "PLACES_PAGES_COUNT": {
     "record_in_processes": ["main", "content"],
     "expires_in_version": "never",
     "kind": "exponential",
     "low": 1000,
     "high": 150000,
@@ -7230,26 +7235,28 @@
   "TELEMETRY_SUCCESSFUL_SEND_PINGS_SIZE_KB": {
     "record_in_processes": ["main"],
     "alert_emails": ["telemetry-client-dev@mozilla.com"],
     "expires_in_version": "61",
     "kind": "exponential",
     "low": 10,
     "high": 1024,
     "n_buckets": 20,
+    "bug_numbers": [1367094],
     "description": "The size (KB) of the Telemetry successfully sent pings"
   },
   "TELEMETRY_FAILED_SEND_PINGS_SIZE_KB": {
     "record_in_processes": ["main"],
     "alert_emails": ["telemetry-client-dev@mozilla.com"],
     "expires_in_version": "61",
     "kind": "exponential",
     "low": 10,
     "high": 1024,
     "n_buckets": 20,
+    "bug_numbers": [1367094],
     "description": "The size (KB) of the Telemetry unsuccessfully sent pings"
   },
   "TELEMETRY_PING_SIZE_EXCEEDED_SEND": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["telemetry-client-dev@mozilla.com"],
     "expires_in_version": "never",
     "kind": "count",
     "description": "Number of Telemetry pings discarded before sending because they exceeded the maximum size"
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -186,17 +186,16 @@
     "DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_TYPE",
     "DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_VERSION",
     "DEVTOOLS_WEBIDE_CONNECTION_DEBUG_USED",
     "DEVTOOLS_WEBIDE_CONNECTION_PLAY_USED",
     "DEVTOOLS_WEBIDE_CONNECTION_RESULT",
     "DEVTOOLS_WEBIDE_CONNECTION_TIME_SECONDS",
     "DEVTOOLS_WEBIDE_LOCAL_CONNECTION_RESULT",
     "DEVTOOLS_WEBIDE_OTHER_CONNECTION_RESULT",
-    "DEVTOOLS_WEBIDE_PROJECT_EDITOR_TIME_ACTIVE_SECONDS",
     "DEVTOOLS_WEBIDE_REMOTE_CONNECTION_RESULT",
     "DEVTOOLS_WEBIDE_SIMULATOR_CONNECTION_RESULT",
     "DEVTOOLS_WEBIDE_TIME_ACTIVE_SECONDS",
     "DEVTOOLS_WEBIDE_USB_CONNECTION_RESULT",
     "DEVTOOLS_WEBIDE_WIFI_CONNECTION_RESULT",
     "DNS_BLACKLIST_COUNT",
     "DNS_CLEANUP_AGE",
     "DNS_FAILED_LOOKUP_TIME",
@@ -247,18 +246,16 @@
     "FX_NEW_WINDOW_MS",
     "FX_PAGE_LOAD_MS",
     "FX_SESSION_RESTORE_NUMBER_OF_EAGER_TABS_RESTORED",
     "FX_SESSION_RESTORE_NUMBER_OF_TABS_RESTORED",
     "FX_SESSION_RESTORE_NUMBER_OF_WINDOWS_RESTORED",
     "FX_TABLETMODE_PAGE_LOAD",
     "FX_TAB_CLICK_MS",
     "FX_TAB_SWITCH_SPINNER_VISIBLE_MS",
-    "FX_TAB_SWITCH_TOTAL_E10S_MS",
-    "FX_TAB_SWITCH_TOTAL_MS",
     "FX_THUMBNAILS_BG_CAPTURE_CANVAS_DRAW_TIME_MS",
     "FX_THUMBNAILS_BG_CAPTURE_DONE_REASON_2",
     "FX_THUMBNAILS_BG_CAPTURE_PAGE_LOAD_TIME_MS",
     "FX_THUMBNAILS_BG_CAPTURE_QUEUE_TIME_MS",
     "FX_THUMBNAILS_BG_CAPTURE_SERVICE_TIME_MS",
     "FX_THUMBNAILS_BG_QUEUE_SIZE_ON_CAPTURE",
     "FX_THUMBNAILS_CAPTURE_TIME_MS",
     "FX_THUMBNAILS_HIT_OR_MISS",
@@ -839,17 +836,16 @@
     "DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_TYPE",
     "DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_VERSION",
     "DEVTOOLS_WEBIDE_CONNECTION_DEBUG_USED",
     "DEVTOOLS_WEBIDE_CONNECTION_PLAY_USED",
     "DEVTOOLS_WEBIDE_CONNECTION_RESULT",
     "DEVTOOLS_WEBIDE_CONNECTION_TIME_SECONDS",
     "DEVTOOLS_WEBIDE_LOCAL_CONNECTION_RESULT",
     "DEVTOOLS_WEBIDE_OTHER_CONNECTION_RESULT",
-    "DEVTOOLS_WEBIDE_PROJECT_EDITOR_TIME_ACTIVE_SECONDS",
     "DEVTOOLS_WEBIDE_REMOTE_CONNECTION_RESULT",
     "DEVTOOLS_WEBIDE_SIMULATOR_CONNECTION_RESULT",
     "DEVTOOLS_WEBIDE_TIME_ACTIVE_SECONDS",
     "DEVTOOLS_WEBIDE_USB_CONNECTION_RESULT",
     "DEVTOOLS_WEBIDE_WIFI_CONNECTION_RESULT",
     "DNS_BLACKLIST_COUNT",
     "DNS_CLEANUP_AGE",
     "DNS_FAILED_LOOKUP_TIME",
@@ -1879,18 +1875,16 @@
     "DEVTOOLS_STYLEEDITOR_OPENED_COUNT",
     "DEVTOOLS_TILT_OPENED_COUNT",
     "DEVTOOLS_TOOLBOX_OPENED_COUNT",
     "DEVTOOLS_WEBAUDIOEDITOR_OPENED_COUNT",
     "DEVTOOLS_WEBCONSOLE_OPENED_COUNT",
     "DEVTOOLS_WEBIDE_IMPORT_PROJECT_COUNT",
     "DEVTOOLS_WEBIDE_NEW_PROJECT_COUNT",
     "DEVTOOLS_WEBIDE_OPENED_COUNT",
-    "DEVTOOLS_WEBIDE_PROJECT_EDITOR_OPENED_COUNT",
-    "DEVTOOLS_WEBIDE_PROJECT_EDITOR_SAVE_COUNT",
     "DOCUMENT_WITH_EXPANDED_PRINCIPAL",
     "DOM_SCRIPT_SRC_ENCODING",
     "ENABLE_PRIVILEGE_EVER_CALLED",
     "FENNEC_DISTRIBUTION_REFERRER_INVALID",
     "FENNEC_ORBOT_INSTALLED",
     "FENNEC_RESTORING_ACTIVITY",
     "FENNEC_SESSIONSTORE_ALL_FILES_DAMAGED",
     "FENNEC_SESSIONSTORE_DAMAGED_SESSION_FILE",
--- a/toolkit/components/telemetry/histogram_tools.py
+++ b/toolkit/components/telemetry/histogram_tools.py
@@ -73,16 +73,17 @@ def exponential_buckets(dmin, dmax, n_bu
 always_allowed_keys = ['kind', 'description', 'cpp_guard', 'expires_in_version',
                        'alert_emails', 'keyed', 'releaseChannelCollection',
                        'bug_numbers', 'record_in_processes']
 
 whitelists = None
 
 
 def load_whitelist():
+    global whitelists
     try:
         whitelist_path = os.path.join(os.path.abspath(os.path.realpath(os.path.dirname(__file__))),
                                       'histogram-whitelists.json')
         with open(whitelist_path, 'r') as f:
             try:
                 whitelists = json.load(f)
                 for name, whitelist in whitelists.iteritems():
                     whitelists[name] = set(whitelist)