Bug 810149: Telemetry to track time spent recursively scanning addon directories on startup. r=vdjeric
authorNagarjuna Varma <junky.argonaut@gmail.com>
Mon, 26 Nov 2012 18:04:47 -0500
changeset 114158 4af18f1149397fdee656ce62830fdbbf02e00391
parent 114157 543a19b5d466f922788108a1dda7cbe0d32890ef
child 114159 e624ff41b15e10da625f69f0c5d29c98a170505f
push id23907
push useremorley@mozilla.com
push dateTue, 27 Nov 2012 14:15:28 +0000
treeherdermozilla-central@532d0832c09d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvdjeric
bugs810149
milestone20.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 810149: Telemetry to track time spent recursively scanning addon directories on startup. r=vdjeric
toolkit/components/telemetry/Histograms.json
toolkit/mozapps/extensions/XPIProvider.jsm
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -2463,10 +2463,16 @@
   },
   "COMPONENTS_LOOKUPMETHOD_ACCESSED_BY_CONTENT": {
     "kind": "flag",
     "description": "Whether content ever accesed Components.lookupMethod in this session"
   },
   "COMPONENTS_INTERFACES_ACCESSED_BY_CONTENT": {
     "kind": "flag",
     "description": "Whether content ever accesed Components.interfaces in this session"
+  },
+  "CHECK_ADDONS_MODIFIED_MS": {
+    "kind": "exponential",
+    "high": "5000",
+    "n_buckets": 15,
+    "description": "Time (ms) it takes to figure out extension last modified time"
   }
 }
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -2981,17 +2981,21 @@ var XPIProvider = {
     // If the schema appears to have changed then we should update the database
     updateDatabase = updateDatabase || DB_SCHEMA != Prefs.getIntPref(PREF_DB_SCHEMA, 0);
 
     // If the application has changed then check for new distribution add-ons
     if (aAppChanged !== false &&
         Prefs.getBoolPref(PREF_INSTALL_DISTRO_ADDONS, true))
       updateDatabase = this.installDistributionAddons(manifests) || updateDatabase;
 
+    // Telemetry probe added around getInstallLocationStates() to check perf
+    let telemetryCaptureTime = new Date();
     let state = this.getInstallLocationStates();
+    let telemetry = Services.telemetry;
+    telemetry.getHistogramById("CHECK_ADDONS_MODIFIED_MS").add(new Date() - telemetryCaptureTime);
 
     if (!updateDatabase) {
       // If the state has changed then we must update the database
       let cache = Prefs.getCharPref(PREF_INSTALL_CACHE, null);
       updateDatabase = cache != JSON.stringify(state);
     }
 
     // If the database doesn't exist and there are add-ons installed then we