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

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

Issue 2652603002: service worker: Add UMA for navigation preload response timing. (Closed)
Patch Set: patch for landing? Created 3 years, 11 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 4d75b4d2b31881fb7d76d55c2e8f4fc10dfb95c3..934e4ee9eff6922bfc0f381240c2c2f478c9b2e4 100644
--- a/content/browser/service_worker/service_worker_metrics.h
+++ b/content/browser/service_worker/service_worker_metrics.h
@@ -317,6 +317,19 @@ class ServiceWorkerMetrics {
// navigation preload request is to be sent.
static void RecordNavigationPreloadRequestHeaderSize(size_t size);
+ // Records timings for the navigation preload response and how
+ // it compares to starting the worker.
+ // |worker_start| is the time it took to prepare an activated and running
+ // worker to receive the fetch event. |initial_worker_status| and
+ // |start_situation| describe the preparation needed.
+ // |response_start| is the time it took until the navigation preload response
+ // started.
+ CONTENT_EXPORT static void RecordNavigationPreloadResponse(
+ base::TimeDelta worker_start,
+ base::TimeDelta response_start,
+ EmbeddedWorkerStatus initial_worker_status,
+ StartSituation start_situation);
+
// Records the result of trying to handle a request for a service worker
// script.
static void RecordContextRequestHandlerStatus(

Powered by Google App Engine
This is Rietveld 408576698