#include "rtc_base/numerics/sample_counter.h"
#include <cstdint>
#include <limits>
#include "absl/types/optional.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
namespace rtc {
SampleCounter::SampleCounter() = default;
SampleCounter::~SampleCounter() = default;
void SampleCounter::Add(int sample) { … }
void SampleCounter::Add(const SampleCounter& other) { … }
absl::optional<int> SampleCounter::Avg(int64_t min_required_samples) const { … }
absl::optional<int> SampleCounter::Max() const { … }
absl::optional<int> SampleCounter::Min() const { … }
absl::optional<int64_t> SampleCounter::Sum(int64_t min_required_samples) const { … }
int64_t SampleCounter::NumSamples() const { … }
void SampleCounter::Reset() { … }
SampleCounterWithVariance::SampleCounterWithVariance() = default;
SampleCounterWithVariance::~SampleCounterWithVariance() = default;
absl::optional<int64_t> SampleCounterWithVariance::Variance(
int64_t min_required_samples) const { … }
void SampleCounterWithVariance::Add(int sample) { … }
void SampleCounterWithVariance::Add(const SampleCounterWithVariance& other) { … }
void SampleCounterWithVariance::Reset() { … }
}