16 #include <boost/program_options.hpp>
18 namespace po = boost::program_options;
21 int main(
int argc,
char* argv[]) {
23 unsigned int toys = 1;
26 po::options_description desc(
"Allowed options");
29 (
"help",
"produce help message")
30 (
"toys",po::value<unsigned int>(&toys)->default_value(100000000),
"number searches to be done")
31 (
"verbose",po::value<unsigned int>(&lvl)->default_value(
Acts::Logging::INFO),
"logging level");
34 po::store(po::parse_command_line(argc, argv, desc), vm);
37 if (vm.count(
"help") != 0
u) {
38 std::cout << desc << std::endl;
41 }
catch (std::exception&
e) {
42 std::cerr <<
"error: " << e.what() << std::endl;
48 std::vector<float> fewBins;
50 for (
unsigned int ib = 0;
ib < 6; ++
ib) {
51 fewBins.push_back(
ib * 6. / 5.);
55 std::vector<float> mediumBins;
56 mediumBins.reserve(21);
57 for (
unsigned int ib = 0;
ib < 21; ++
ib) {
58 mediumBins.push_back(
ib * 6. / 20.);
62 std::vector<float> manyBins;
63 manyBins.reserve(101);
64 for (
unsigned int ib = 0;
ib < 101; ++
ib) {
65 manyBins.push_back(
ib * 6. / 100.);
78 auto bin = (num_iters % 2) != 0
u ? small.
bin(low) : small.
bin(high);
88 ACTS_INFO(
"Execution stats small: " << bin_utility_benchmark_small);
89 ACTS_INFO(
"Fraction is: " << st <<
" vs. " << gt);
96 auto bin = (num_iters % 2) != 0
u ? medium.
bin(low) : medium.
bin(high);
106 ACTS_INFO(
"Execution stats medium: " << bin_utility_benchmark_medium);
107 ACTS_INFO(
"Fraction is: " << st <<
" vs. " << gt);
114 auto bin = (num_iters % 2) != 0
u ? many.
bin(low) : many.
bin(high);
124 ACTS_INFO(
"Execution stats many: " << bin_utility_benchmark_many);
125 ACTS_INFO(
"Fraction is: " << st <<
" vs. " << gt);
133 auto bin = (num_iters % 2) != 0
u ? equidistant.
bin(low)
134 : equidistant.
bin(high);
144 ACTS_INFO(
"Execution stats equidistant: " << bin_utility_benchmark_eq);
145 ACTS_INFO(
"Fraction is: " << st <<
" vs. " << gt);