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

Unified Diff: components/domain_reliability/uploader.cc

Issue 2466093002: Domain Reliability: Add more upload-related histograms. (Closed)
Patch Set: A couple of tweaks. Created 4 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 | « components/domain_reliability/context_manager.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/domain_reliability/uploader.cc
diff --git a/components/domain_reliability/uploader.cc b/components/domain_reliability/uploader.cc
index 4b6a1b5863fa7c9a222de61ceb9ef9e766cb6780..3ded0849d3392ceeaf20d35d7e4125da3f1ca4ef 100644
--- a/components/domain_reliability/uploader.cc
+++ b/components/domain_reliability/uploader.cc
@@ -96,6 +96,13 @@ class DomainReliabilityUploaderImpl
fetcher->Start();
upload_callbacks_[fetcher] = {std::move(owned_fetcher), callback};
+
+ base::TimeTicks now = base::TimeTicks::Now();
+ if (!last_upload_start_time_.is_null()) {
+ UMA_HISTOGRAM_LONG_TIMES("DomainReliability.UploadIntervalGlobal",
+ now - last_upload_start_time_);
+ }
+ last_upload_start_time_ = now;
}
void set_discard_uploads(bool discard_uploads) override {
@@ -153,6 +160,7 @@ class DomainReliabilityUploaderImpl
std::pair<std::unique_ptr<net::URLFetcher>, UploadCallback>>
upload_callbacks_;
bool discard_uploads_;
+ base::TimeTicks last_upload_start_time_;
};
} // namespace
« no previous file with comments | « components/domain_reliability/context_manager.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698