diff --git a/benchmark/benchmark.hpp b/benchmark/benchmark.hpp index ead6b39e75..ad9ab7cc83 100644 --- a/benchmark/benchmark.hpp +++ b/benchmark/benchmark.hpp @@ -95,7 +95,8 @@ struct alloc_data { ->ArgNames( \ BENCHMARK_PRIVATE_CONCAT_NAME(BaseClass, Method)::argsName()) \ ->Name(BENCHMARK_PRIVATE_CONCAT_NAME(BaseClass, Method)::name()) \ - ->MinWarmUpTime(1) + ->Iterations( \ + BENCHMARK_PRIVATE_CONCAT_NAME(BaseClass, Method)::iterations()) class fixed_alloc_size : public alloc_size_interface { public: @@ -238,6 +239,7 @@ class alloc_benchmark : public benchmark_interface { return res; } static std::string name() { return base::name() + "/alloc"; } + static int64_t iterations() { return 200000; } protected: using base = benchmark_interface; @@ -324,6 +326,7 @@ class multiple_malloc_free_benchmark : public alloc_benchmark { res.insert(res.end(), n.begin(), n.end()); return res; } + static int64_t iterations() { return 2000; } std::default_random_engine generator; distribution dist; }; diff --git a/benchmark/benchmark_interfaces.hpp b/benchmark/benchmark_interfaces.hpp index 8681160626..e25c977710 100644 --- a/benchmark/benchmark_interfaces.hpp +++ b/benchmark/benchmark_interfaces.hpp @@ -55,7 +55,7 @@ struct benchmark_interface : public benchmark::Fixture { return res; } static std::string name() { return Allocator::name(); } - + static int64_t iterations() { return 10000; } Size alloc_size; Allocator allocator; };