7 #include "benchmark/benchmark.h"
9 #include "ContainerBenchmarks.h"
10 #include "GenerateInput.h"
12 using namespace ContainerBenchmarks
;
14 constexpr std::size_t TestNumInputs
= 1024;
16 BENCHMARK_CAPTURE(BM_ConstructSize
, vector_byte
, std::vector
<unsigned char>{})->Arg(5140480);
18 BENCHMARK_CAPTURE(BM_CopyConstruct
, vector_int
, std::vector
<int>{})->Arg(5140480);
20 BENCHMARK_CAPTURE(BM_Assignment
, vector_int
, std::vector
<int>{})->Arg(5140480);
22 BENCHMARK_CAPTURE(BM_ConstructSizeValue
, vector_byte
, std::vector
<unsigned char>{}, 0)->Arg(5140480);
24 BENCHMARK_CAPTURE(BM_ConstructIterIter
, vector_char
, std::vector
<char>{}, getRandomIntegerInputs
<char>)
27 BENCHMARK_CAPTURE(BM_ConstructIterIter
, vector_size_t
, std::vector
<size_t>{}, getRandomIntegerInputs
<size_t>)
30 BENCHMARK_CAPTURE(BM_ConstructIterIter
, vector_string
, std::vector
<std::string
>{}, getRandomStringInputs
)
33 BENCHMARK_CAPTURE(BM_ConstructFromRange
, vector_char
, std::vector
<char>{}, getRandomIntegerInputs
<char>)
36 BENCHMARK_CAPTURE(BM_ConstructFromRange
, vector_size_t
, std::vector
<size_t>{}, getRandomIntegerInputs
<size_t>)
39 BENCHMARK_CAPTURE(BM_ConstructFromRange
, vector_string
, std::vector
<std::string
>{}, getRandomStringInputs
)
42 BENCHMARK_CAPTURE(BM_Pushback
, vector_int
, std::vector
<int>{})->Arg(TestNumInputs
);