delivery_man_benchmark_parameterized.cpp
Go to the documentation of this file.
00001 #include <hayai/hayai.hpp>
00002 
00003 #include "delivery_man.hpp"
00004 
00005 /*
00006  * Benchmarks can be parameterized. Here is example for
00007  * simple test without dedicated fixture.
00008  *
00009  * Last macro argument is just method parameters declaration.
00010  * Number of arguments is not limited, just make sure that
00011  * brackets around them are present.
00012  */
00013 BENCHMARK_P(DeliveryMan, DeliverPackage, 10, 100,
00014             (std::size_t speed, std::size_t distance))
00015 {
00016     DeliveryMan(speed).DeliverPackage(distance);
00017 }
00018 
00019 BENCHMARK_P_INSTANCE(DeliveryMan, DeliverPackage, (1, 10));
00020 BENCHMARK_P_INSTANCE(DeliveryMan, DeliverPackage, (5, 10));
00021 BENCHMARK_P_INSTANCE(DeliveryMan, DeliverPackage, (10, 10));


hayai
Author(s): Nick Bruun
autogenerated on Thu Jun 6 2019 18:13:43