#include "components/metrics/serialization/metric_sample.h"
#include <string>
#include <string_view>
#include <vector>
#include "base/check_op.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
namespace metrics {
MetricSample::MetricSample(MetricSample::SampleType sample_type,
const std::string& metric_name,
int sample,
int min,
int max,
int bucket_count,
int num_samples)
: … { … }
MetricSample::~MetricSample() { … }
bool MetricSample::IsValid() const { … }
std::string MetricSample::ToString() const { … }
int MetricSample::sample() const { … }
int MetricSample::min() const { … }
int MetricSample::max() const { … }
int MetricSample::bucket_count() const { … }
std::unique_ptr<MetricSample> MetricSample::CrashSample(
const std::string& crash_name,
int num_samples) { … }
std::unique_ptr<MetricSample> MetricSample::ParseCrash(
const std::string& serialized) { … }
std::unique_ptr<MetricSample> MetricSample::HistogramSample(
const std::string& histogram_name,
int sample,
int min,
int max,
int bucket_count,
int num_samples) { … }
std::unique_ptr<MetricSample> MetricSample::ParseHistogram(
const std::string& serialized_histogram) { … }
std::unique_ptr<MetricSample> MetricSample::SparseHistogramSample(
const std::string& histogram_name,
int sample,
int num_samples) { … }
std::unique_ptr<MetricSample> MetricSample::ParseSparseHistogram(
const std::string& serialized_histogram) { … }
std::unique_ptr<MetricSample> MetricSample::LinearHistogramSample(
const std::string& histogram_name,
int sample,
int max,
int num_samples) { … }
std::unique_ptr<MetricSample> MetricSample::ParseLinearHistogram(
const std::string& serialized_histogram) { … }
std::unique_ptr<MetricSample> MetricSample::UserActionSample(
const std::string& action_name,
int num_samples) { … }
std::unique_ptr<MetricSample> MetricSample::ParseUserAction(
const std::string& serialized) { … }
bool MetricSample::IsEqual(const MetricSample& metric) { … }
}