Go to the documentation of this file.00001 #include <hayai/hayai.hpp>
00002 #include <cstddef>
00003 #include <cstdlib>
00004 #include <ctime>
00005
00006 #include "delivery_man.hpp"
00007
00008 class FastDeliveryManFixture
00009 : public ::hayai::Fixture
00010 {
00011 public:
00012 virtual void SetUp()
00013 {
00014 this->FastDeliveryMan = new DeliveryMan(10);
00015 }
00016
00017 virtual void TearDown()
00018 {
00019 delete this->FastDeliveryMan;
00020 }
00021
00022 DeliveryMan* FastDeliveryMan;
00023 };
00024
00025
00026
00027
00028 BENCHMARK_P_F(FastDeliveryManFixture, DeliverPackage, 10, 100,
00029 (std::size_t distance))
00030 {
00031 FastDeliveryMan->DeliverPackage(distance);
00032 }
00033
00034 BENCHMARK_P_INSTANCE(FastDeliveryManFixture, DeliverPackage, (1));
00035 BENCHMARK_P_INSTANCE(FastDeliveryManFixture, DeliverPackage, (10));
00036 BENCHMARK_P_INSTANCE(FastDeliveryManFixture, DeliverPackage, (100));