Commit d80ebf6c authored by asvitkine's avatar asvitkine Committed by Commit bot

Add a histogram to log the size of an UMA upload.

This is better than the existing pair of histograms
UMA.ProtoCompressionRatio and UMA.ProtoGzippedKBSaved
which require manual calculation to get at the approx.
value.

BUG=409179

Review URL: https://codereview.chromium.org/523153002

Cr-Commit-Position: refs/heads/master@{#293011}
parent 2b966f21
...@@ -1026,7 +1026,9 @@ void MetricsService::OnLogUploadComplete(int response_code) { ...@@ -1026,7 +1026,9 @@ void MetricsService::OnLogUploadComplete(int response_code) {
// Provide boolean for error recovery (allow us to ignore response_code). // Provide boolean for error recovery (allow us to ignore response_code).
bool discard_log = false; bool discard_log = false;
const size_t log_size = log_manager_.staged_log().length(); const size_t log_size = log_manager_.staged_log().length();
if (!upload_succeeded && log_size > kUploadLogAvoidRetransmitSize) { if (upload_succeeded) {
UMA_HISTOGRAM_COUNTS_10000("UMA.LogSize.OnSuccess", log_size / 1024);
} else if (log_size > kUploadLogAvoidRetransmitSize) {
UMA_HISTOGRAM_COUNTS("UMA.Large Rejected Log was Discarded", UMA_HISTOGRAM_COUNTS("UMA.Large Rejected Log was Discarded",
static_cast<int>(log_size)); static_cast<int>(log_size));
discard_log = true; discard_log = true;
......
...@@ -34648,6 +34648,14 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -34648,6 +34648,14 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary> </summary>
</histogram> </histogram>
<histogram name="UMA.LogSize.OnSuccess" units="KB">
<owner>asvitkine@chromium.org</owner>
<summary>
Size in kilobytes (after compression) of an uploaded UMA log. Recorded after
a successful UMA upload.
</summary>
</histogram>
<histogram name="UMA.LowEntropySourceValue"> <histogram name="UMA.LowEntropySourceValue">
<owner>asvitkine@chromium.org</owner> <owner>asvitkine@chromium.org</owner>
<summary> <summary>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment