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

Unified Diff: sync/internal_api/http_bridge.cc

Issue 1471103002: [Sync] Add histograms for sync response/error codes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix wording Created 5 years, 1 month 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/http_bridge.cc
diff --git a/sync/internal_api/http_bridge.cc b/sync/internal_api/http_bridge.cc
index 6da0dd31e8538eac57c68e9f9202afe09ca9015b..68d2762f8d1fb6db0ec063e173d7c69333d16018 100644
--- a/sync/internal_api/http_bridge.cc
+++ b/sync/internal_api/http_bridge.cc
@@ -7,6 +7,7 @@
#include "base/message_loop/message_loop.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -432,6 +433,10 @@ void HttpBridge::OnURLFetchComplete(const net::URLFetcher* source) {
if (fetch_state_.request_succeeded)
LogTimeout(false);
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Sync.URLFetchResponse",
+ source->GetStatus().is_success()
+ ? source->GetResponseCode()
+ : source->GetStatus().ToNetError());
UMA_HISTOGRAM_LONG_TIMES("Sync.URLFetchTime",
fetch_state_.end_time - fetch_state_.start_time);
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698