Chromium Code Reviews| Index: sync/util/data_type_histogram.h |
| diff --git a/sync/util/data_type_histogram.h b/sync/util/data_type_histogram.h |
| index 0f7e6a99e594fb5d678ae8a4d4a3a875a3dc3584..8cf7a5688234ef9623e9d3bbeb50308175ac2e45 100644 |
| --- a/sync/util/data_type_histogram.h |
| +++ b/sync/util/data_type_histogram.h |
| @@ -5,10 +5,18 @@ |
| #ifndef SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_ |
| #define SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_ |
| +#include <string> |
| + |
| #include "base/metrics/histogram.h" |
|
Alexei Svitkine (slow)
2015/08/25 15:49:28
Nit: Change this to histogram_macros.h
amohammadkhan
2015/08/25 16:35:36
Done.
|
| #include "base/time/time.h" |
| #include "sync/internal_api/public/base/model_type.h" |
| +// This function adds |value| to |sample| bucket of histogram |name|. |value| |
| +// should be greater or equal to 1 and |name| can be variable. DataTypes are |
| +// mapped to proper |sample| bucket by using ModelTypeToHistogramInt() function. |
| +// So different DataTypes play the role of different buckets in this histogram. |
| +void SyncRecordDatatypeBin(const std::string& name, int sample, int value); |
| + |
| // For now, this just implements UMA_HISTOGRAM_LONG_TIMES. This can be adjusted |
| // if we feel the min, max, or bucket count amount are not appropriate. |
| #define SYNC_FREQ_HISTOGRAM(name, time) UMA_HISTOGRAM_CUSTOM_TIMES( \ |