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

Unified Diff: chrome/browser/metrics/sampling_metrics_provider.cc

Issue 2180373003: Adding reporting of metrics sampling rate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Alexei's comments. Created 4 years, 5 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: chrome/browser/metrics/sampling_metrics_provider.cc
diff --git a/chrome/browser/metrics/sampling_metrics_provider.cc b/chrome/browser/metrics/sampling_metrics_provider.cc
new file mode 100644
index 0000000000000000000000000000000000000000..355bc4feb7c97bf7764871ba7f2fdc0e3f485ca2
--- /dev/null
+++ b/chrome/browser/metrics/sampling_metrics_provider.cc
@@ -0,0 +1,23 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/metrics/sampling_metrics_provider.h"
+
+#include "base/metrics/sparse_histogram.h"
+#include "chrome/browser/metrics/chrome_metrics_services_manager_client.h"
+#include "components/metrics/metrics_provider.h"
+
+namespace metrics {
+
+SamplingMetricsProvider::SamplingMetricsProvider() {}
+SamplingMetricsProvider::~SamplingMetricsProvider() {}
+
+void SamplingMetricsProvider::ProvideGeneralMetrics(
Alexei Svitkine (slow) 2016/08/01 17:23:51 Maybe this should be ProvideStabilityMetrics - so
jwd 2016/08/01 18:57:14 Ok, so UMA_STABILITY_HISTOGRAM_ENUMERATION will ju
Alexei Svitkine (slow) 2016/08/01 18:59:02 I think we should still use a sparse histogram. Yo
jwd 2016/08/01 20:11:35 Done.
+ ChromeUserMetricsExtension* uma_proto) {
+ UMA_HISTOGRAM_SPARSE_SLOWLY(
Alexei Svitkine (slow) 2016/08/01 17:23:51 Should we just not log this for users who are not
jwd 2016/08/01 18:57:14 Done.
+ "UMA.SamplingRatePerMille",
+ ChromeMetricsServicesManagerClient::GetSamplingRatePerMille());
+}
+
+} // namespace metrics

Powered by Google App Engine
This is Rietveld 408576698