OLD | NEW |
---|---|
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 |
OLD | NEW |