Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: components/metrics/persisted_logs.cc

Issue 1871733002: Add histograms for observing UMA throttling effect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/metrics/persisted_logs.cc
diff --git a/components/metrics/persisted_logs.cc b/components/metrics/persisted_logs.cc
index c78ecec2596b995dd04364fb9a272ecd5613123c..4282d2ad6432669954dd6f99e5ccb7ec912bbe94 100644
--- a/components/metrics/persisted_logs.cc
+++ b/components/metrics/persisted_logs.cc
@@ -131,11 +131,14 @@ void PersistedLogs::WriteLogsToPrefList(base::ListValue* list_value) const {
++saved_log_count;
}
+ UMA_HISTOGRAM_COUNTS("UMA.UnSentLog.Dropped", start - 1);
+
for (size_t i = start; i < list_.size(); ++i) {
size_t log_size = list_[i].compressed_log_data.length();
if (log_size > max_log_size_) {
UMA_HISTOGRAM_COUNTS("UMA.Large Accumulated Log Not Persisted",
static_cast<int>(log_size));
+ UMA_HISTOGRAM_COUNTS("UMA.UnSentLog.Dropped", 1);
Alexei Svitkine (slow) 2016/04/08 15:08:32 Can you just log the total at the end of the funct
gayane -on leave until 09-2017 2016/04/08 17:19:25 Done.
continue;
}
AppendBase64String(list_[i].compressed_log_data, list_value);

Powered by Google App Engine
This is Rietveld 408576698