| 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 | |
| 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 |
| 26 // static | |
| 27 void AppCacheHistograms::AddTaskQueueTimeSample( | 24 void AppCacheHistograms::AddTaskQueueTimeSample( |
| 28 const base::TimeDelta& duration) { | 25 const base::TimeDelta& duration) { |
| 29 UMA_HISTOGRAM_TIMES("appcache.TaskQueueTime", duration); | 26 UMA_HISTOGRAM_TIMES("appcache.TaskQueueTime", duration); |
| 30 } | 27 } |
| 31 | 28 |
| 32 // static | |
| 33 void AppCacheHistograms::AddTaskRunTimeSample( | 29 void AppCacheHistograms::AddTaskRunTimeSample( |
| 34 const base::TimeDelta& duration) { | 30 const base::TimeDelta& duration) { |
| 35 UMA_HISTOGRAM_TIMES("appcache.TaskRunTime", duration); | 31 UMA_HISTOGRAM_TIMES("appcache.TaskRunTime", duration); |
| 36 } | 32 } |
| 37 | 33 |
| 38 // static | |
| 39 void AppCacheHistograms::AddCompletionQueueTimeSample( | 34 void AppCacheHistograms::AddCompletionQueueTimeSample( |
| 40 const base::TimeDelta& duration) { | 35 const base::TimeDelta& duration) { |
| 41 UMA_HISTOGRAM_TIMES("appcache.CompletionQueueTime", duration); | 36 UMA_HISTOGRAM_TIMES("appcache.CompletionQueueTime", duration); |
| 42 } | 37 } |
| 43 | 38 |
| 44 // static | |
| 45 void AppCacheHistograms::AddCompletionRunTimeSample( | 39 void AppCacheHistograms::AddCompletionRunTimeSample( |
| 46 const base::TimeDelta& duration) { | 40 const base::TimeDelta& duration) { |
| 47 UMA_HISTOGRAM_TIMES("appcache.CompletionRunTime", duration); | 41 UMA_HISTOGRAM_TIMES("appcache.CompletionRunTime", duration); |
| 48 } | 42 } |
| 49 | 43 |
| 44 void AppCacheHistograms::AddMissingManifestEntrySample() { |
| 45 UMA_HISTOGRAM_BOOLEAN("appcache.MissingManifestEntry", true); |
| 46 } |
| 47 |
| 48 void AppCacheHistograms::AddMissingManifstDetectedAtCallsite( |
| 49 MissingManifestCallsiteType callsite) { |
| 50 UMA_HISTOGRAM_ENUMERATION( |
| 51 "appcache.MissingManifestDetectedAtCallsite", |
| 52 callsite, NUM_MISSING_MANIFEST_CALLSITE_TYPES); |
| 53 } |
| 54 |
| 50 } // namespace appcache | 55 } // namespace appcache |
| OLD | NEW |