2016-07-24 14:51:55 +08:00
|
|
|
#include <vector>
|
|
|
|
#include <functional>
|
|
|
|
#include <cstdint>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstring>
|
|
|
|
|
2018-01-18 12:23:01 +08:00
|
|
|
#include "benchmark/benchmark.h"
|
2016-07-24 14:51:55 +08:00
|
|
|
|
|
|
|
#include "ContainerBenchmarks.hpp"
|
|
|
|
#include "GenerateInput.hpp"
|
|
|
|
|
|
|
|
using namespace ContainerBenchmarks;
|
|
|
|
|
|
|
|
constexpr std::size_t TestNumInputs = 1024;
|
|
|
|
|
|
|
|
BENCHMARK_CAPTURE(BM_ConstructIterIter,
|
|
|
|
vector_char,
|
|
|
|
std::vector<char>{},
|
|
|
|
getRandomIntegerInputs<char>)->Arg(TestNumInputs);
|
|
|
|
|
|
|
|
BENCHMARK_CAPTURE(BM_ConstructIterIter,
|
|
|
|
vector_size_t,
|
|
|
|
std::vector<size_t>{},
|
|
|
|
getRandomIntegerInputs<size_t>)->Arg(TestNumInputs);
|
|
|
|
|
|
|
|
BENCHMARK_CAPTURE(BM_ConstructIterIter,
|
|
|
|
vector_string,
|
|
|
|
std::vector<std::string>{},
|
|
|
|
getRandomStringInputs)->Arg(TestNumInputs);
|
|
|
|
|
|
|
|
|
2018-01-18 12:23:01 +08:00
|
|
|
BENCHMARK_MAIN();
|