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

Unified Diff: components/metrics/metrics_reporting_scheduler.cc

Issue 2590013002: Allow MetricsReportingScheduler's histograms to be overriden. (Closed)
Patch Set: Created 4 years 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/metrics/metrics_reporting_scheduler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_reporting_scheduler.cc
diff --git a/components/metrics/metrics_reporting_scheduler.cc b/components/metrics/metrics_reporting_scheduler.cc
index ab117ad01e96d3cc486840b01657b3928308e40e..625d546fea28391a85f575f42a7733fa9a727cb6 100644
--- a/components/metrics/metrics_reporting_scheduler.cc
+++ b/components/metrics/metrics_reporting_scheduler.cc
@@ -46,25 +46,6 @@ const double kBackoffMultiplier = 1.1;
// The maximum backoff multiplier.
const int kMaxBackoffMultiplier = 10;
-enum InitSequence {
- TIMER_FIRED_FIRST,
- INIT_TASK_COMPLETED_FIRST,
- INIT_SEQUENCE_ENUM_SIZE,
-};
-
-void LogMetricsInitSequence(InitSequence sequence) {
- UMA_HISTOGRAM_ENUMERATION("UMA.InitSequence", sequence,
- INIT_SEQUENCE_ENUM_SIZE);
-}
-
-void LogActualUploadInterval(TimeDelta interval) {
- UMA_HISTOGRAM_CUSTOM_COUNTS("UMA.ActualLogUploadInterval",
- interval.InMinutes(),
- 1,
- base::TimeDelta::FromHours(12).InMinutes(),
- 50);
-}
-
} // anonymous namespace
MetricsReportingScheduler::MetricsReportingScheduler(
@@ -136,6 +117,19 @@ void MetricsReportingScheduler::SetUploadIntervalForTesting(
upload_interval_ = interval;
}
+void MetricsReportingScheduler::LogMetricsInitSequence(InitSequence sequence) {
+ UMA_HISTOGRAM_ENUMERATION("UMA.InitSequence", sequence,
+ INIT_SEQUENCE_ENUM_SIZE);
+}
+
+void MetricsReportingScheduler::LogActualUploadInterval(TimeDelta interval) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS("UMA.ActualLogUploadInterval",
+ interval.InMinutes(),
+ 1,
+ base::TimeDelta::FromHours(12).InMinutes(),
+ 50);
+}
+
void MetricsReportingScheduler::TriggerUpload() {
// If the timer fired before the init task has completed, don't trigger the
// upload yet - wait for the init task to complete and do it then.
« no previous file with comments | « components/metrics/metrics_reporting_scheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698