Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10115)

Unified Diff: content/renderer/service_worker/service_worker_cache_storage_dispatcher.h

Issue 797463002: [ServiceWorker] Cache & CacheStorage operation histograms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/service_worker/service_worker_cache_storage_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/service_worker/service_worker_cache_storage_dispatcher.h
diff --git a/content/renderer/service_worker/service_worker_cache_storage_dispatcher.h b/content/renderer/service_worker/service_worker_cache_storage_dispatcher.h
index 9af067857346b16215b2df1bcd5c5aeba6171c65..b12979b0ac688366a808245d5b1d1049084f6775 100644
--- a/content/renderer/service_worker/service_worker_cache_storage_dispatcher.h
+++ b/content/renderer/service_worker/service_worker_cache_storage_dispatcher.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
+#include "base/time/time.h"
#include "content/public/renderer/render_process_observer.h"
#include "third_party/WebKit/public/platform/WebServiceWorkerCache.h"
#include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h"
@@ -127,6 +128,8 @@ class ServiceWorkerCacheStorageDispatcher
typedef IDMap<CacheStorageMatchCallbacks, IDMapOwnPointer>
StorageMatchCallbacksMap;
+ typedef base::hash_map<int32, base::TimeTicks> TimeMap;
+
typedef IDMap<blink::WebServiceWorkerCache::CacheMatchCallbacks,
IDMapOwnPointer> MatchCallbacksMap;
typedef IDMap<blink::WebServiceWorkerCache::CacheWithResponsesCallbacks,
@@ -150,6 +153,12 @@ class ServiceWorkerCacheStorageDispatcher
KeysCallbacksMap keys_callbacks_;
StorageMatchCallbacksMap match_callbacks_;
+ TimeMap has_times_;
+ TimeMap open_times_;
+ TimeMap delete_times_;
+ TimeMap keys_times_;
+ TimeMap match_times_;
+
// The individual caches created under this CacheStorage object.
IDMap<WebCache, IDMapExternalPointer> web_caches_;
@@ -160,6 +169,11 @@ class ServiceWorkerCacheStorageDispatcher
WithRequestsCallbacksMap cache_keys_callbacks_;
WithResponsesCallbacksMap cache_batch_callbacks_;
+ TimeMap cache_match_times_;
+ TimeMap cache_match_all_times_;
+ TimeMap cache_keys_times_;
+ TimeMap cache_batch_times_;
+
base::WeakPtrFactory<ServiceWorkerCacheStorageDispatcher> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorageDispatcher);
« no previous file with comments | « no previous file | content/renderer/service_worker/service_worker_cache_storage_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698