24.02.1
|
Go to the documentation of this file.
26 #include "../Framework.h"
27 #include "../instruments/InstrumentsStats.h"
28 #include "../instruments/Measurement.h"
38 std::string PrettyPrinter::begin_color(
const std::string &color)
const
45 return "\033[0;3" + color +
"m";
48 std::string PrettyPrinter::end_color()
const
60 _color_output = color_output;
65 *_stream << begin_color(
"4") <<
name <<
" = " << value << end_color() <<
"\n";
86 *_stream << begin_color(
"2") <<
"Running [" <<
info.id <<
"] '" <<
info.name <<
"'" << end_color() <<
"\n";
103 *_stream << begin_color(
"1") <<
"INFO: " <<
info << end_color() <<
"\n";
109 *_stream << begin_color(
"1") <<
prefix << error.what() << end_color() <<
"\n";
114 for(
auto const &
info : infos)
116 *_stream <<
"[" <<
info.id <<
", " <<
info.mode <<
", " <<
info.status <<
"] " <<
info.name <<
"\n";
127 for(
const auto &instrument : measurements)
129 *_stream << begin_color(
"3") <<
" " << instrument.first <<
":";
134 *_stream <<
"AVG=" << stats.
mean() <<
" " << stats.
max().
unit();
135 if(instrument.second.size() > 1)
138 *_stream <<
", MIN=" << stats.
min();
139 *_stream <<
", MAX=" << stats.
max();
142 *_stream << end_color() <<
"\n";
const std::string & unit() const
Accessor for the unit of the measurement.
void print_run_footer() override
Print footer after running all tests.
void print_measurements(const Profiler::MeasurementsMap &measurements) override
Print measurements for a test.
Generate common statistics for a set of measurements.
void print_entry(const std::string &name, const std::string &value) override
Print an entry consisting of a (name, value) pair.
void print_test_footer() override
Print footer after a test.
const Measurement & min() const
The measurement with the minimum value.
void print_test_header(const TestInfo &info) override
Print header before a test.
void print_info(const std::string &info) override
Print test log info.
void print_list_tests(const std::vector< TestInfo > &infos) override
Print the list of all the tests.
const Value & value() const
Accessor for the stored value.
void print_global_header() override
Print global header.
std::string arithmetic_to_string(T val, int decimal_places=0)
Create a string with the arithmetic value in full precision.
void print_errors_header() override
Print header before errors.
std::map< std::string, std::vector< Measurement > > MeasurementsMap
Mapping from instrument ids to their measurements.
void print_profiler_header(const std::string &header_data) override
Print header data.
void print_error(const std::exception &error, bool expected) override
Print test error.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
const Measurement & max() const
The measurement with the maximum value.
const Measurement & median() const
The median measurement.
Copyright (c) 2017-2024 Arm Limited.
const Measurement::Value & mean() const
The average of all the measurements.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
Information about a test case.
void print_global_footer() override
Print global footer.
double relative_standard_deviation() const
The relative standard deviation of the measurements.
void set_color_output(bool color_output)
Set if the output is colored.
void print_errors_footer() override
Print footer after errors.
void print_run_header() override
Print header before running all tests.