1*6777b538SAndroid Build Coastguard Worker // Copyright 2016 The Chromium Authors 2*6777b538SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*6777b538SAndroid Build Coastguard Worker // found in the LICENSE file. 4*6777b538SAndroid Build Coastguard Worker 5*6777b538SAndroid Build Coastguard Worker #ifndef COMPONENTS_METRICS_SAMPLING_METRICS_PROVIDER_H_ 6*6777b538SAndroid Build Coastguard Worker #define COMPONENTS_METRICS_SAMPLING_METRICS_PROVIDER_H_ 7*6777b538SAndroid Build Coastguard Worker 8*6777b538SAndroid Build Coastguard Worker #include "components/metrics/metrics_provider.h" 9*6777b538SAndroid Build Coastguard Worker 10*6777b538SAndroid Build Coastguard Worker namespace metrics { 11*6777b538SAndroid Build Coastguard Worker 12*6777b538SAndroid Build Coastguard Worker // Provides metrics related to sampling of metrics reporting clients. In 13*6777b538SAndroid Build Coastguard Worker // particular, the rate at which clients are sampled. 14*6777b538SAndroid Build Coastguard Worker class SamplingMetricsProvider : public MetricsProvider { 15*6777b538SAndroid Build Coastguard Worker public: 16*6777b538SAndroid Build Coastguard Worker // |sampling_rate_per_mille| is the number of clients per 1000 that are in the 17*6777b538SAndroid Build Coastguard Worker // sample. 18*6777b538SAndroid Build Coastguard Worker explicit SamplingMetricsProvider(int sampling_rate_per_mille); 19*6777b538SAndroid Build Coastguard Worker ~SamplingMetricsProvider() override = default; 20*6777b538SAndroid Build Coastguard Worker SamplingMetricsProvider(const SamplingMetricsProvider&) = delete; 21*6777b538SAndroid Build Coastguard Worker SamplingMetricsProvider operator=(const SamplingMetricsProvider&) = delete; 22*6777b538SAndroid Build Coastguard Worker 23*6777b538SAndroid Build Coastguard Worker private: 24*6777b538SAndroid Build Coastguard Worker // MetricsProvider: 25*6777b538SAndroid Build Coastguard Worker void ProvideStabilityMetrics( 26*6777b538SAndroid Build Coastguard Worker SystemProfileProto* system_profile_proto) override; 27*6777b538SAndroid Build Coastguard Worker 28*6777b538SAndroid Build Coastguard Worker int sampling_rate_per_mille_; 29*6777b538SAndroid Build Coastguard Worker }; 30*6777b538SAndroid Build Coastguard Worker 31*6777b538SAndroid Build Coastguard Worker } // namespace metrics 32*6777b538SAndroid Build Coastguard Worker 33*6777b538SAndroid Build Coastguard Worker #endif // COMPONENTS_METRICS_SAMPLING_METRICS_PROVIDER_H_ 34