#include "testing/perf/perf_result_reporter.h"
#include <ostream>
#include <vector>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "testing/perf/perf_test.h"
namespace {
static const base::NoDestructor<std::vector<std::string>> kInvalidCharacters{ … };
void CheckForInvalidCharacters(const std::string& str) { … }
}
namespace perf_test {
PerfResultReporter::PerfResultReporter(const std::string& metric_basename,
const std::string& story_name)
: … { … }
PerfResultReporter::~PerfResultReporter() = default;
void PerfResultReporter::RegisterFyiMetric(const std::string& metric_suffix,
const std::string& units) { … }
void PerfResultReporter::RegisterImportantMetric(
const std::string& metric_suffix,
const std::string& units) { … }
void PerfResultReporter::AddResult(const std::string& metric_suffix,
size_t value) const { … }
void PerfResultReporter::AddResult(const std::string& metric_suffix,
double value) const { … }
void PerfResultReporter::AddResult(const std::string& metric_suffix,
const std::string& value) const { … }
void PerfResultReporter::AddResult(const std::string& metric_suffix,
base::TimeDelta value) const { … }
void PerfResultReporter::AddResultList(const std::string& metric_suffix,
const std::string& values) const { … }
void PerfResultReporter::AddResultMeanAndError(
const std::string& metric_suffix,
const std::string& mean_and_error) { … }
bool PerfResultReporter::GetMetricInfo(const std::string& metric_suffix,
MetricInfo* out) const { … }
void PerfResultReporter::RegisterMetric(const std::string& metric_suffix,
const std::string& units,
bool important) { … }
MetricInfo PerfResultReporter::GetMetricInfoOrFail(
const std::string& metric_suffix) const { … }
}