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

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, 5 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/browser/service_worker/service_worker_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9a6eb565d32f2a22b2c7ab6892e361238528fb58 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 are handled while a Service
+ // 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,
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698