#include "base/test/metrics/histogram_tester.h"
#include <stddef.h>
#include <string_view>
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_samples.h"
#include "base/metrics/metrics_hashes.h"
#include "base/metrics/sample_map.h"
#include "base/metrics/sparse_histogram.h"
#include "base/metrics/statistics_recorder.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
HistogramTester::HistogramTester() { … }
HistogramTester::~HistogramTester() = default;
void HistogramTester::ExpectUniqueSample(
std::string_view name,
HistogramBase::Sample sample,
HistogramBase::Count expected_bucket_count,
const Location& location) const { … }
void HistogramTester::ExpectUniqueTimeSample(
std::string_view name,
TimeDelta sample,
HistogramBase::Count expected_bucket_count,
const Location& location) const { … }
void HistogramTester::ExpectBucketCount(std::string_view name,
HistogramBase::Sample sample,
HistogramBase::Count expected_count,
const Location& location) const { … }
void HistogramTester::ExpectTotalCount(std::string_view name,
HistogramBase::Count expected_count,
const Location& location) const { … }
void HistogramTester::ExpectTimeBucketCount(std::string_view name,
TimeDelta sample,
HistogramBase::Count count,
const Location& location) const { … }
int64_t HistogramTester::GetTotalSum(std::string_view name) const { … }
std::vector<Bucket> HistogramTester::GetAllSamples(
std::string_view name) const { … }
HistogramBase::Count HistogramTester::GetBucketCount(
std::string_view name,
HistogramBase::Sample sample) const { … }
void HistogramTester::GetBucketCountForSamples(
const HistogramBase& histogram,
HistogramBase::Sample sample,
HistogramBase::Count* count,
HistogramBase::Count* total_count) const { … }
HistogramTester::CountsMap HistogramTester::GetTotalCountsForPrefix(
std::string_view prefix) const { … }
std::unique_ptr<HistogramSamples>
HistogramTester::GetHistogramSamplesSinceCreation(
std::string_view histogram_name) const { … }
std::string HistogramTester::GetAllHistogramsRecorded() const { … }
int HistogramTester::GetTotalCountForSamples(
const base::HistogramBase& histogram) const { … }
std::string HistogramTester::SnapshotToString(
const base::HistogramBase& histogram) const { … }
void PrintTo(const Bucket& bucket, std::ostream* os) { … }
}