39 virtual std::string
id()
const = 0;
52 std::ostringstream
report(
struct report *rep, std::string
id)
const
54 for (
auto &r : reporters)
56 return r->output(rep);
57 return std::ostringstream();
62 this->reporters.push_back(in_reporter);
65 bool has([[maybe_unused]] std::string
id)
67 for (
auto &r : reporters)
76 std::vector<std::shared_ptr<reporter>> reporters;
84#define ADD_REPORTER(in_rep) \
85 static struct in_rep##_reporter \
89 reporter_eg.add_reporter(std::make_shared<in_rep>(in_rep())); \
91 } in_rep##_reporter_instance
96 std::string
id()
const override
102 std::ostringstream oss;
104 <<
"\"\n - space: " << rep->
input_size <<
"\n - min: " << rep->
min
105 <<
"s\n - max: " << rep->
max <<
"s\n - median: " << rep->
median
106 <<
"s\n - mean: " << rep->
mean
108 <<
"\n - Q1: " << rep->
q1 <<
"s\n - Q3: " << rep->
q2 <<
"\n";
116 std::string
id()
const override
122 std::ostringstream oss;
137 std::string
id()
const override
141 std::ostringstream
output([[maybe_unused]]
struct report *rep)
const override
143 std::ostringstream oss;
std::ostringstream output(struct report *rep) const override
std::string id() const override
std::string id() const override
std::ostringstream output(struct report *rep) const override
std::ostringstream output(struct report *rep) const override
std::string id() const override
void add_reporter(std::shared_ptr< reporter > in_reporter) noexcept
reporter_engine()=default
~reporter_engine()=default
std::ostringstream report(struct report *rep, std::string id) const
virtual std::string id() const =0
virtual std::ostringstream output(struct report *rep) const =0
void set_reporter(std::string rep)
reporter_engine reporter_eg
std::string & get_reporter()
double standard_deviation
const std::string benchmark_name
long unsigned int input_size