#include <benchmark.hpp>
|
| BenchmarkExec (std::string backend, std::string benchmark="all", size_t bench_index=0) |
|
Class for the consecutive execution of all benchmarks/SNABs registered in the snab_registry.hpp
Definition at line 37 of file benchmark.hpp.
SNAB::BenchmarkExec::BenchmarkExec |
( |
std::string |
backend, |
|
|
std::string |
benchmark = "all" , |
|
|
size_t |
bench_index = 0 |
|
) |
| |
|
inline |
Constructor which executes all registered benchmarks and gives the result to std::cout and backend.json
Definition at line 101 of file benchmark.hpp.
106 for (
auto i : snab_vec) {
109 global_logger().info(
"SNABSuite",
110 "Executing " +
i->snab_name());
111 size_t repeat = check_for_repeat(
i->get_config());
115 results.push_back({{
"model",
i->snab_name()},
116 {
"timestamp", timestamp()},
118 {
"results",
i->evaluate_json()}});
121 std::vector<cypress::Json> repeat_results;
123 for (
size_t j = 0; j < repeat; j++) {
125 repeat_results.push_back(
i->evaluate_json());
128 {{
"model",
i->snab_name()},
129 {
"timestamp", timestamp()},
131 {
"results", merge_repeat_results(repeat_results)}});
135 std::cout << results.dump(4) << std::endl;
139 (backend +
"_" + std::to_string(
bench_index) +
".json").c_str(),
141 if (results.size() > 1) {
142 file << results.dump(4) << std::endl;
145 file << results[0].dump(4) << std::endl;
std::vector< std::shared_ptr< SNABBase > > snab_registry(std::string backend, size_t bench_index)
The documentation for this class was generated from the following file: