Bug 1058832 - Remove unneeded LocalStorage Telemetry. r=honzab
authorVladan Djeric <vdjeric@mozilla.com>
Tue, 26 Aug 2014 15:12:42 -0400
changeset 201739 b005b4e38525b0803cc7755b7d66caf8882674d3
parent 201738 4354d5ed23115f8ada3cbe2eb783594b3ac1b4a5
child 201740 3a545eb9828b44ac6e62859be6b0eba6f01f5047
push id27380
push userkwierso@gmail.com
push dateWed, 27 Aug 2014 00:50:11 +0000
treeherdermozilla-central@83289be2cd12 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershonzab
bugs1058832
milestone34.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 1058832 - Remove unneeded LocalStorage Telemetry. r=honzab
dom/src/storage/DOMStorageCache.cpp
toolkit/components/telemetry/Histograms.json
--- a/dom/src/storage/DOMStorageCache.cpp
+++ b/dom/src/storage/DOMStorageCache.cpp
@@ -346,18 +346,16 @@ DOMStorageCache::WaitForPreload(Telemetr
   // done before we've shut the DB down or when the DB could not start,
   // preload has not even be started.
   sDatabase->SyncPreload(this);
 }
 
 nsresult
 DOMStorageCache::GetLength(const DOMStorage* aStorage, uint32_t* aRetval)
 {
-  Telemetry::AutoTimer<Telemetry::LOCALDOMSTORAGE_GETLENGTH_MS> autoTimer;
-
   if (Persist(aStorage)) {
     WaitForPreload(Telemetry::LOCALDOMSTORAGE_GETLENGTH_BLOCKING_MS);
     if (NS_FAILED(mLoadResult)) {
       return mLoadResult;
     }
   }
 
   *aRetval = DataSet(aStorage).mKeys.Count();
@@ -396,18 +394,16 @@ FindKeyOrder(const nsAString& aKey, cons
 
 nsresult
 DOMStorageCache::GetKey(const DOMStorage* aStorage, uint32_t aIndex, nsAString& aRetval)
 {
   // XXX: This does a linear search for the key at index, which would
   // suck if there's a large numer of indexes. Do we care? If so,
   // maybe we need to have a lazily populated key array here or
   // something?
-  Telemetry::AutoTimer<Telemetry::LOCALDOMSTORAGE_GETKEY_MS> autoTimer;
-
   if (Persist(aStorage)) {
     WaitForPreload(Telemetry::LOCALDOMSTORAGE_GETKEY_BLOCKING_MS);
     if (NS_FAILED(mLoadResult)) {
       return mLoadResult;
     }
   }
 
   IndexFinderData data(aIndex, aRetval);
@@ -426,35 +422,31 @@ KeysArrayBuilder(const nsAString& aKey, 
   return PL_DHASH_NEXT;
 }
 
 } // anon
 
 void
 DOMStorageCache::GetKeys(const DOMStorage* aStorage, nsTArray<nsString>& aKeys)
 {
-  Telemetry::AutoTimer<Telemetry::LOCALDOMSTORAGE_GETALLKEYS_MS> autoTimer;
-
   if (Persist(aStorage)) {
     WaitForPreload(Telemetry::LOCALDOMSTORAGE_GETALLKEYS_BLOCKING_MS);
   }
 
   if (NS_FAILED(mLoadResult)) {
     return;
   }
 
   DataSet(aStorage).mKeys.EnumerateRead(KeysArrayBuilder, &aKeys);
 }
 
 nsresult
 DOMStorageCache::GetItem(const DOMStorage* aStorage, const nsAString& aKey,
                          nsAString& aRetval)
 {
-  Telemetry::AutoTimer<Telemetry::LOCALDOMSTORAGE_GETVALUE_MS> autoTimer;
-
   if (Persist(aStorage)) {
     WaitForPreload(Telemetry::LOCALDOMSTORAGE_GETVALUE_BLOCKING_MS);
     if (NS_FAILED(mLoadResult)) {
       return mLoadResult;
     }
   }
 
   // not using AutoString since we don't want to copy buffer to result
@@ -467,18 +459,16 @@ DOMStorageCache::GetItem(const DOMStorag
 
   return NS_OK;
 }
 
 nsresult
 DOMStorageCache::SetItem(const DOMStorage* aStorage, const nsAString& aKey,
                          const nsString& aValue, nsString& aOld)
 {
-  Telemetry::AutoTimer<Telemetry::LOCALDOMSTORAGE_SETVALUE_MS> autoTimer;
-
   if (Persist(aStorage)) {
     WaitForPreload(Telemetry::LOCALDOMSTORAGE_SETVALUE_BLOCKING_MS);
     if (NS_FAILED(mLoadResult)) {
       return mLoadResult;
     }
   }
 
   Data& data = DataSet(aStorage);
@@ -515,18 +505,16 @@ DOMStorageCache::SetItem(const DOMStorag
 
   return NS_OK;
 }
 
 nsresult
 DOMStorageCache::RemoveItem(const DOMStorage* aStorage, const nsAString& aKey,
                             nsString& aOld)
 {
-  Telemetry::AutoTimer<Telemetry::LOCALDOMSTORAGE_REMOVEKEY_MS> autoTimer;
-
   if (Persist(aStorage)) {
     WaitForPreload(Telemetry::LOCALDOMSTORAGE_REMOVEKEY_BLOCKING_MS);
     if (NS_FAILED(mLoadResult)) {
       return mLoadResult;
     }
   }
 
   Data& data = DataSet(aStorage);
@@ -551,18 +539,16 @@ DOMStorageCache::RemoveItem(const DOMSto
   }
 
   return NS_OK;
 }
 
 nsresult
 DOMStorageCache::Clear(const DOMStorage* aStorage)
 {
-  Telemetry::AutoTimer<Telemetry::LOCALDOMSTORAGE_CLEAR_MS> autoTimer;
-
   bool refresh = false;
   if (Persist(aStorage)) {
     // We need to preload all data (know the size) before we can proceeed
     // to correctly decrease cached usage number.
     // XXX as in case of unload, this is not technically needed now, but
     // after super-scope quota introduction we have to do this.  Get telemetry
     // right now.
     WaitForPreload(Telemetry::LOCALDOMSTORAGE_CLEAR_BLOCKING_MS);
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -4051,120 +4051,64 @@
     "extended_statistics_ok": true,
     "description": "Time to flush and close the localStorage database (ms)"
   },
   "LOCALDOMSTORAGE_PRELOAD_PENDING_ON_FIRST_ACCESS": {
     "expires_in_version": "never",
     "kind": "boolean",
     "description": "True when we had to wait for a pending preload on first access to localStorage data, false otherwise"
   },
-  "LOCALDOMSTORAGE_GETALLKEYS_MS": {
-    "expires_in_version": "never",
-    "kind": "exponential",
-    "high": "3000",
-    "n_buckets": 10,
-    "extended_statistics_ok": true,
-    "description": "Time to return a list of all keys in domain's LocalStorage (ms)"
-  },
   "LOCALDOMSTORAGE_GETALLKEYS_BLOCKING_MS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": "3000",
     "n_buckets": 10,
     "extended_statistics_ok": true,
     "description": "Time to block before we return a list of all keys in domain's LocalStorage (ms)"
   },
-  "LOCALDOMSTORAGE_GETKEY_MS": {
-    "expires_in_version": "never",
-    "kind": "exponential",
-    "high": "3000",
-    "n_buckets": 10,
-    "extended_statistics_ok": true,
-    "description": "Time to return a key name in domain's LocalStorage (ms)"
-  },
   "LOCALDOMSTORAGE_GETKEY_BLOCKING_MS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": "3000",
     "n_buckets": 10,
     "extended_statistics_ok": true,
     "description": "Time to block before we return a key name in domain's LocalStorage (ms)"
   },
-  "LOCALDOMSTORAGE_GETLENGTH_MS": {
-    "expires_in_version": "never",
-    "kind": "exponential",
-    "high": "3000",
-    "n_buckets": 10,
-    "extended_statistics_ok": true,
-    "description": "Time to return number of keys in domain's LocalStorage (ms)"
-  },
   "LOCALDOMSTORAGE_GETLENGTH_BLOCKING_MS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": "3000",
     "n_buckets": 10,
     "extended_statistics_ok": true,
     "description": "Time to block before we return number of keys in domain's LocalStorage (ms)"
   },
-  "LOCALDOMSTORAGE_GETVALUE_MS": {
-    "expires_in_version": "never",
-    "kind": "exponential",
-    "high": "3000",
-    "n_buckets": 10,
-    "extended_statistics_ok": true,
-    "description": "Time to return a value for a key in LocalStorage (ms)"
-  },
   "LOCALDOMSTORAGE_GETVALUE_BLOCKING_MS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": "3000",
     "n_buckets": 10,
     "extended_statistics_ok": true,
     "description": "Time to block before we return a value for a key in LocalStorage (ms)"
   },
-  "LOCALDOMSTORAGE_SETVALUE_MS": {
-    "expires_in_version": "never",
-    "kind": "exponential",
-    "high": "3000",
-    "n_buckets": 10,
-    "extended_statistics_ok": true,
-    "description": "Time to set a single key's value in LocalStorage (ms)"
-  },
   "LOCALDOMSTORAGE_SETVALUE_BLOCKING_MS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": "3000",
     "n_buckets": 10,
     "extended_statistics_ok": true,
     "description": "Time to block before we set a single key's value in LocalStorage (ms)"
   },
-  "LOCALDOMSTORAGE_REMOVEKEY_MS": {
-    "expires_in_version": "never",
-    "kind": "exponential",
-    "high": "3000",
-    "n_buckets": 10,
-    "extended_statistics_ok": true,
-    "description": "Time to remove a single key from LocalStorage (ms)"
-  },
   "LOCALDOMSTORAGE_REMOVEKEY_BLOCKING_MS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": "3000",
     "n_buckets": 10,
     "extended_statistics_ok": true,
     "description": "Time to block before we remove a single key from LocalStorage (ms)"
   },
-  "LOCALDOMSTORAGE_CLEAR_MS": {
-    "expires_in_version": "never",
-    "kind": "exponential",
-    "high": "3000",
-    "n_buckets": 10,
-    "extended_statistics_ok": true,
-    "description": "Time to clear LocalStorage for all domains (ms)"
-  },
   "LOCALDOMSTORAGE_CLEAR_BLOCKING_MS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": "3000",
     "n_buckets": 10,
     "extended_statistics_ok": true,
     "description": "Time to block before we clear LocalStorage for all domains (ms)"
   },