7 int argc,
char* argv[],
15 JB_LOG(
info) <<
"Configuration for test\n" << cfg <<
"\n";
19 auto testcase = testcases.find(cfg.
test_case());
21 if (testcase == testcases.end()) {
22 std::ostringstream os;
23 os <<
"Unknown test case (" << cfg.
test_case() <<
")\n";
24 os <<
" --test-case must be one of:";
25 for (
auto const& i : testcases) {
26 os <<
" " << i.first <<
"\n";
31 testcase->second(cfg);
44 std::cerr <<
"usage: " << ex.what() << std::endl;
46 }
catch (std::exception
const& ex) {
47 std::cerr <<
"standard exception raised: " << ex.what() << std::endl;
50 std::cerr <<
"unknown exception raised" << std::endl;
jb::config_attribute< microbenchmark_config, std::string > test_case
jb::config_attribute< microbenchmark_config, bool > verbose
int microbenchmark_group_main(int argc, char *argv[], microbenchmark_group< microbenchmark_config > const &testcases)
Overload microbenchmark_group_main for jb::testing::microbenchmark_config.
std::map< std::string, std::function< void(config const &cfg)> > microbenchmark_group
Define a representation for a group of microbenchmarks.
Configure a micro-benchmark.
A simple class to communicate the result of parsing the options.
void process_cmdline(int &argc, char *argv[])
Process the command line.
int report_exception_at_exit()
The top-level namespace for the JayBeams library.