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

Unified Diff: content/browser/service_worker/service_worker_metrics.h

Issue 1178043002: Update ServiceWorker event handled status histogram (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
Index: content/browser/service_worker/service_worker_metrics.h
diff --git a/content/browser/service_worker/service_worker_metrics.h b/content/browser/service_worker/service_worker_metrics.h
index 52f471cd3d3774ca5c2170c1495170840924b857..4fb0e66e28d5e44e784e76400266a3c5d2034782 100644
--- a/content/browser/service_worker/service_worker_metrics.h
+++ b/content/browser/service_worker/service_worker_metrics.h
@@ -73,6 +73,13 @@ class ServiceWorkerMetrics {
NUM_STOP_STATUS_TYPES
};
+ enum EventType {
+ EVENT_TYPE_FETCH,
+ // Add new events to record here.
+
+ NUM_EVENT_TYPES
+ };
+
// Used for ServiceWorkerDiskCache.
static void CountInitDiskCacheResult(bool result);
static void CountReadResponseResult(ReadResponseResult result);
@@ -110,9 +117,12 @@ class ServiceWorkerMetrics {
static void RecordActivateEventStatus(ServiceWorkerStatusCode status);
static void RecordInstallEventStatus(ServiceWorkerStatusCode status);
- // Records the ratio of unhandled events to the all events fired during
- // the lifetime of ServiceWorker.
- static void RecordEventStatus(size_t fired_events, size_t handled_events);
+ // Records how much of dispatched events is handled while a Service
falken 2015/07/03 04:45:00 I think it's "are handled"
kinuko 2015/07/05 09:19:04 Done.
+ // Worker is awake (i.e. after it is woken up until it gets stopped).
+ static void RecordEventHandledRatio(const GURL& scope,
+ EventType event,
+ size_t handled_events,
+ size_t fired_events);
// Records the result of dispatching a fetch event to a service worker.
static void RecordFetchEventStatus(bool is_main_resource,

Powered by Google App Engine
This is Rietveld 408576698