#include "test/testsupport/perf_test.h"
#include <stdio.h>
#include <algorithm>
#include <fstream>
#include <set>
#include <sstream>
#include <vector>
#include "absl/strings/string_view.h"
#include "api/numerics/samples_stats_counter.h"
#include "rtc_base/checks.h"
#include "rtc_base/strings/string_builder.h"
#include "rtc_base/synchronization/mutex.h"
#include "test/testsupport/file_utils.h"
#include "test/testsupport/perf_test_histogram_writer.h"
namespace webrtc {
namespace test {
namespace {
std::string UnitWithDirection(
absl::string_view units,
webrtc::test::ImproveDirection improve_direction) { … }
std::vector<SamplesStatsCounter::StatsSample> GetSortedSamples(
const SamplesStatsCounter& counter) { … }
template <typename Container>
void OutputListToStream(std::ostream* ostream, const Container& values) { … }
struct PlottableCounter { … };
class PlottableCounterPrinter { … };
PlottableCounterPrinter& GetPlottableCounterPrinter() { … }
class ResultsLinePrinter { … };
ResultsLinePrinter& GetResultsLinePrinter() { … }
PerfTestResultWriter& GetPerfWriter() { … }
}
void ClearPerfResults() { … }
void SetPerfResultsOutput(FILE* output) { … }
std::string GetPerfResults() { … }
void PrintPlottableResults(const std::vector<std::string>& desired_graphs) { … }
bool WritePerfResults(const std::string& output_path) { … }
void PrintResult(absl::string_view measurement,
absl::string_view modifier,
absl::string_view trace,
const double value,
absl::string_view units,
bool important,
ImproveDirection improve_direction) { … }
void PrintResult(absl::string_view measurement,
absl::string_view modifier,
absl::string_view trace,
const SamplesStatsCounter& counter,
absl::string_view units,
const bool important,
ImproveDirection improve_direction) { … }
void PrintResultMeanAndError(absl::string_view measurement,
absl::string_view modifier,
absl::string_view trace,
const double mean,
const double error,
absl::string_view units,
bool important,
ImproveDirection improve_direction) { … }
void PrintResultList(absl::string_view measurement,
absl::string_view modifier,
absl::string_view trace,
const rtc::ArrayView<const double> values,
absl::string_view units,
bool important,
ImproveDirection improve_direction) { … }
}
}