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

Side by Side Diff: content/browser/service_worker/service_worker_metrics.cc

Issue 1604033003: Add status() DCHECK to ServiceWorkerVersion::StartRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update histograms.xml Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/service_worker_metrics.h" 5 #include "content/browser/service_worker/service_worker_metrics.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/metrics/sparse_histogram.h" 8 #include "base/metrics/sparse_histogram.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "content/common/service_worker/service_worker_types.h" 10 #include "content/common/service_worker/service_worker_types.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 break; 201 break;
202 case EventType::PUSH: 202 case EventType::PUSH:
203 UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.PushEvent.Time", time); 203 UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.PushEvent.Time", time);
204 break; 204 break;
205 205
206 // Event duration for fetch is recorded separately. 206 // Event duration for fetch is recorded separately.
207 case EventType::FETCH: 207 case EventType::FETCH:
208 // For now event duration for these events is not recorded. 208 // For now event duration for these events is not recorded.
209 case EventType::GEOFENCING: 209 case EventType::GEOFENCING:
210 case EventType::SERVICE_PORT_CONNECT: 210 case EventType::SERVICE_PORT_CONNECT:
211 case EventType::MESSAGE:
211 break; 212 break;
212 213
213 case EventType::NUM_TYPES: 214 case EventType::NUM_TYPES:
214 NOTREACHED() << "Invalid event type"; 215 NOTREACHED() << "Invalid event type";
215 break; 216 break;
216 } 217 }
217 } 218 }
218 219
219 void ServiceWorkerMetrics::RecordFetchEventStatus( 220 void ServiceWorkerMetrics::RecordFetchEventStatus(
220 bool is_main_resource, 221 bool is_main_resource,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 UMA_HISTOGRAM_ENUMERATION("ServiceWorker.URLRequestJob.FallbackedRequestMode", 276 UMA_HISTOGRAM_ENUMERATION("ServiceWorker.URLRequestJob.FallbackedRequestMode",
276 mode, FETCH_REQUEST_MODE_LAST + 1); 277 mode, FETCH_REQUEST_MODE_LAST + 1);
277 } 278 }
278 279
279 void ServiceWorkerMetrics::RecordTimeBetweenEvents( 280 void ServiceWorkerMetrics::RecordTimeBetweenEvents(
280 const base::TimeDelta& time) { 281 const base::TimeDelta& time) {
281 UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.TimeBetweenEvents", time); 282 UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.TimeBetweenEvents", time);
282 } 283 }
283 284
284 } // namespace content 285 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_metrics.h ('k') | content/browser/service_worker/service_worker_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698