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 | 11 // static |
12 void AppCacheHistograms::CountInitResult(InitResultType init_result) { | 12 void AppCacheHistograms::CountInitResult(InitResultType init_result) { |
13 UMA_HISTOGRAM_ENUMERATION( | 13 UMA_HISTOGRAM_ENUMERATION( |
14 "appcache.InitResult", | 14 "appcache.InitResult", |
15 init_result, NUM_INIT_RESULT_TYPES); | 15 init_result, NUM_INIT_RESULT_TYPES); |
16 } | 16 } |
17 | 17 |
18 // static | 18 // static |
19 void AppCacheHistograms::CountCheckResponseResult( | 19 void AppCacheHistograms::CountCheckResponseResult( |
20 CheckResponseResultType result) { | 20 CheckResponseResultType result) { |
21 UMA_HISTOGRAM_ENUMERATION( | 21 UMA_HISTOGRAM_ENUMERATION( |
22 "appcache.CheckResponseResult", | 22 "appcache.CheckResponseResult", |
23 result, NUM_CHECK_RESPONSE_RESULT_TYPES); | 23 result, NUM_CHECK_RESPONSE_RESULT_TYPES); |
24 } | 24 } |
25 | 25 |
| 26 // static |
| 27 void AppCacheHistograms::AddTaskQueueTimeSample( |
| 28 const base::TimeDelta& duration) { |
| 29 UMA_HISTOGRAM_TIMES("appcache.TaskQueueTime", duration); |
| 30 } |
| 31 |
| 32 // static |
| 33 void AppCacheHistograms::AddTaskRunTimeSample( |
| 34 const base::TimeDelta& duration) { |
| 35 UMA_HISTOGRAM_TIMES("appcache.TaskRunTime", duration); |
| 36 } |
| 37 |
| 38 // static |
| 39 void AppCacheHistograms::AddTaskCompletionTimeSample( |
| 40 const base::TimeDelta& duration) { |
| 41 UMA_HISTOGRAM_TIMES("appcache.TaskCompletionTime", duration); |
| 42 } |
| 43 |
| 44 // static |
| 45 void AppCacheHistograms::AddTaskCompletionRunTimeSample( |
| 46 const base::TimeDelta& duration) { |
| 47 UMA_HISTOGRAM_TIMES("appcache.TaskCompletionRunTime", duration); |
| 48 } |
| 49 |
26 } // namespace appcache | 50 } // namespace appcache |
OLD | NEW |