Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "components/ukm/persisted_logs_metrics_impl.h" | |
| 6 | |
| 7 #include "base/metrics/histogram_macros.h" | |
| 8 | |
| 9 namespace ukm { | |
| 10 | |
| 11 metrics::PersistedLogs::LogReadStatus | |
| 12 PersistedLogsMetricsImpl::RecordLogReadStatus( | |
| 13 metrics::PersistedLogs::LogReadStatus status) { | |
| 14 UMA_HISTOGRAM_ENUMERATION("UKM.PersistentLogRecall.Status", | |
| 15 status, metrics::PersistedLogs::END_RECALL_STATUS); | |
| 16 return status; | |
| 17 } | |
| 18 | |
| 19 void PersistedLogsMetricsImpl::RecordCompressionRatio( | |
| 20 size_t compressed_size, size_t original_size) { | |
| 21 UMA_HISTOGRAM_PERCENTAGE( | |
| 22 "UKM.ProtoCompressionRatio", | |
| 23 static_cast<int>(100 * compressed_size / original_size)); | |
| 24 } | |
| 25 | |
| 26 void PersistedLogsMetricsImpl::RecordDroppedLogSize(size_t size) { | |
| 27 UMA_HISTOGRAM_COUNTS("UKM.UnsentLogs.Dropped.Size", | |
|
rkaplow
2017/01/02 23:23:03
nit, we should use _number for these macros. Looki
Steven Holte
2017/01/03 21:16:03
Done.
| |
| 28 static_cast<int>(size)); | |
| 29 } | |
| 30 | |
| 31 void PersistedLogsMetricsImpl::RecordDroppedLogsNum(int dropped_logs_num) { | |
| 32 UMA_HISTOGRAM_COUNTS("UKM.UnsentLogs.Dropped", dropped_logs_num); | |
|
rkaplow
2017/01/02 23:23:03
Looking at the UMA ones, I'd suggest using 10000 i
Steven Holte
2017/01/03 21:16:03
Done.
| |
| 33 } | |
| 34 | |
| 35 } // namespace ukm | |
| OLD | NEW |