OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_ | 5 #ifndef SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_ |
6 #define SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_ | 6 #define SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_ |
7 #pragma once | |
8 | 7 |
9 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
10 #include "base/time.h" | 9 #include "base/time.h" |
11 #include "sync/internal_api/public/base/model_type.h" | 10 #include "sync/internal_api/public/base/model_type.h" |
12 | 11 |
13 // For now, this just implements UMA_HISTOGRAM_LONG_TIMES. This can be adjusted | 12 // For now, this just implements UMA_HISTOGRAM_LONG_TIMES. This can be adjusted |
14 // if we feel the min, max, or bucket count amount are not appropriate. | 13 // if we feel the min, max, or bucket count amount are not appropriate. |
15 #define SYNC_FREQ_HISTOGRAM(name, time) UMA_HISTOGRAM_CUSTOM_TIMES( \ | 14 #define SYNC_FREQ_HISTOGRAM(name, time) UMA_HISTOGRAM_CUSTOM_TIMES( \ |
16 name, time, base::TimeDelta::FromMilliseconds(1), \ | 15 name, time, base::TimeDelta::FromMilliseconds(1), \ |
17 base::TimeDelta::FromHours(1), 50) | 16 base::TimeDelta::FromHours(1), 50) |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 case syncer::APP_NOTIFICATIONS: \ | 81 case syncer::APP_NOTIFICATIONS: \ |
83 PER_DATA_TYPE_MACRO("AppNotifications"); \ | 82 PER_DATA_TYPE_MACRO("AppNotifications"); \ |
84 break; \ | 83 break; \ |
85 default: \ | 84 default: \ |
86 NOTREACHED() << "Unknown datatype " \ | 85 NOTREACHED() << "Unknown datatype " \ |
87 << syncer::ModelTypeToString(datatype); \ | 86 << syncer::ModelTypeToString(datatype); \ |
88 } \ | 87 } \ |
89 } while (0) | 88 } while (0) |
90 | 89 |
91 #endif // SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_ | 90 #endif // SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_ |
OLD | NEW |