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

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

Issue 2706923003: Add UMA for how long service workers run for. (Closed)
Patch Set: constexpr Created 3 years, 10 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 <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 value, max); 971 value, max);
972 } else { 972 } else {
973 UMA_HISTOGRAM_ENUMERATION( 973 UMA_HISTOGRAM_ENUMERATION(
974 "ServiceWorker.ContextRequestHandlerStatus.NewWorker." 974 "ServiceWorker.ContextRequestHandlerStatus.NewWorker."
975 "ImportedScript", 975 "ImportedScript",
976 value, max); 976 value, max);
977 } 977 }
978 } 978 }
979 } 979 }
980 980
981 void ServiceWorkerMetrics::RecordRuntime(base::TimeDelta time) {
982 UMA_HISTOGRAM_LONG_TIMES("ServiceWorker.Runtime", time);
nhiroki 2017/02/23 07:54:23 According to a header comment[1], UMA_HISTOGRAM_LO
falken 2017/02/23 08:18:18 Yes I saw this but figured for our purposes 1 hour
nhiroki 2017/02/23 09:05:05 I see, then UMA_HISTOGRAM_LONG_TIMES would be appr
983 }
984
985 void ServiceWorkerMetrics::RecordStillRunning(base::TimeDelta time) {
986 UMA_HISTOGRAM_LONG_TIMES("ServiceWorker.StillRunningTime", time);
987 }
988
981 } // namespace content 989 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698