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

Side by Side Diff: webkit/appcache/appcache_histograms.cc

Issue 8572048: Histogram appcache task queue and run times. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/appcache/appcache_histograms.h" 5 #include "webkit/appcache/appcache_histograms.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 8
9 namespace appcache { 9 namespace appcache {
10 10
11 // static
12 void AppCacheHistograms::CountInitResult(InitResultType init_result) { 11 void AppCacheHistograms::CountInitResult(InitResultType init_result) {
13 UMA_HISTOGRAM_ENUMERATION( 12 UMA_HISTOGRAM_ENUMERATION(
14 "appcache.InitResult", 13 "appcache.InitResult",
15 init_result, NUM_INIT_RESULT_TYPES); 14 init_result, NUM_INIT_RESULT_TYPES);
16 } 15 }
17 16
18 // static
rvargas (doing something else) 2011/11/17 03:42:05 nit: I'd prefer to keep the comment. I don't know
michaeln 2011/11/17 03:59:47 Done.
19 void AppCacheHistograms::CountCheckResponseResult( 17 void AppCacheHistograms::CountCheckResponseResult(
20 CheckResponseResultType result) { 18 CheckResponseResultType result) {
21 UMA_HISTOGRAM_ENUMERATION( 19 UMA_HISTOGRAM_ENUMERATION(
22 "appcache.CheckResponseResult", 20 "appcache.CheckResponseResult",
23 result, NUM_CHECK_RESPONSE_RESULT_TYPES); 21 result, NUM_CHECK_RESPONSE_RESULT_TYPES);
24 } 22 }
25 23
24 void AppCacheHistograms::AddTaskQueueTimeSample(
25 const base::TimeDelta& duration) {
26 UMA_HISTOGRAM_TIMES("appcache.TaskQueueTime", duration);
27 }
28
29 void AppCacheHistograms::AddTaskRunTimeSample(
30 const base::TimeDelta& duration) {
31 UMA_HISTOGRAM_TIMES("appcache.TaskRunTime", duration);
32 }
33
34 void AppCacheHistograms::AddTaskCompletionTimeSample(
35 const base::TimeDelta& duration) {
36 UMA_HISTOGRAM_TIMES("appcache.TaskCompletionTime", duration);
37 }
38
26 } // namespace appcache 39 } // namespace appcache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698