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

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

Issue 604193002: ServiceWorker: Add UMA to measure execution times of oninstall/onfetch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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_script_context.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_script_context.h
diff --git a/content/renderer/service_worker/service_worker_script_context.h b/content/renderer/service_worker/service_worker_script_context.h
index 078228ab16bcecf5a38fa8739cb415f0e3c3991c..44e80eec70706325e6479a99c6dba95c7bcaa2ac 100644
--- a/content/renderer/service_worker/service_worker_script_context.h
+++ b/content/renderer/service_worker/service_worker_script_context.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_
#define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_
+#include <map>
#include <string>
#include <vector>
@@ -12,6 +13,7 @@
#include "base/id_map.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
+#include "base/time/time.h"
#include "content/child/webmessageportchannel_impl.h"
#include "content/common/service_worker/service_worker_types.h"
#include "content/renderer/service_worker/service_worker_cache_storage_dispatcher.h"
@@ -102,6 +104,11 @@ class ServiceWorkerScriptContext {
// Pending callbacks for GetClientDocuments().
ClientsCallbacksMap pending_clients_callbacks_;
+ // Capture timestamps for UMA
+ std::map<int, base::TimeTicks> activate_start_timings_;
+ std::map<int, base::TimeTicks> fetch_start_timings_;
+ std::map<int, base::TimeTicks> install_start_timings_;
+
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext);
};
« no previous file with comments | « no previous file | content/renderer/service_worker/service_worker_script_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698