#include "cast/streaming/public/statistics.h"
#include <algorithm>
#include <iomanip>
#include <iostream>
#include "absl/strings/str_join.h"
#include "util/enum_name_table.h"
#include "util/json/json_helpers.h"
#include "util/json/json_serialization.h"
#include "util/stringprintf.h"
namespace openscreen::cast {
namespace {
template <typename Type>
Json::Value ToJson(const Type& t) { … }
template <>
Json::Value ToJson(const double& t) { … }
template <typename T, typename Type>
Json::Value ArrayToJson(
const std::array<T, static_cast<size_t>(Type::kNumTypes)>& list,
const EnumNameTable<Type, static_cast<size_t>(Type::kNumTypes)>& names) { … }
}
extern const EnumNameTable<StatisticType,
static_cast<size_t>(StatisticType::kNumTypes)>
kStatisticTypeNames = …;
extern const EnumNameTable<HistogramType,
static_cast<size_t>(HistogramType::kNumTypes)>
kHistogramTypeNames = …;
SimpleHistogram::SimpleHistogram() = default;
SimpleHistogram::SimpleHistogram(int64_t min, int64_t max, int64_t width)
: … { … }
SimpleHistogram::SimpleHistogram(const SimpleHistogram&) = default;
SimpleHistogram::SimpleHistogram(SimpleHistogram&&) noexcept = default;
SimpleHistogram& SimpleHistogram::operator=(const SimpleHistogram&) = default;
SimpleHistogram& SimpleHistogram::operator=(SimpleHistogram&&) = default;
SimpleHistogram::~SimpleHistogram() = default;
bool SimpleHistogram::operator==(const SimpleHistogram& other) const { … }
void SimpleHistogram::Add(int64_t sample) { … }
void SimpleHistogram::Reset() { … }
Json::Value SimpleHistogram::ToJson() const { … }
std::string SimpleHistogram::ToString() const { … }
SimpleHistogram::SimpleHistogram(int64_t min,
int64_t max,
int64_t width,
std::vector<int> buckets)
: … { … }
std::string SimpleHistogram::GetBucketName(size_t index) const { … }
Json::Value SenderStats::ToJson() const { … }
std::string SenderStats::ToString() const { … }
SenderStatsClient::~SenderStatsClient() { … }
}