1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 #include "benchmark/benchmark.h"
13 #include "ContainerBenchmarks.h"
14 #include "GenerateInput.h"
16 using namespace ContainerBenchmarks
;
18 constexpr std::size_t TestNumInputs
= 1024;
20 BENCHMARK_CAPTURE(BM_ConstructSize
, deque_byte
, std::deque
<unsigned char>{})->Arg(5140480);
22 BENCHMARK_CAPTURE(BM_ConstructSizeValue
, deque_byte
, std::deque
<unsigned char>{}, 0)->Arg(5140480);
24 BENCHMARK_CAPTURE(BM_ConstructIterIter
, deque_char
, std::deque
<char>{}, getRandomIntegerInputs
<char>)
27 BENCHMARK_CAPTURE(BM_ConstructIterIter
, deque_size_t
, std::deque
<size_t>{}, getRandomIntegerInputs
<size_t>)
30 BENCHMARK_CAPTURE(BM_ConstructIterIter
, deque_string
, std::deque
<std::string
>{}, getRandomStringInputs
)
33 BENCHMARK_CAPTURE(BM_ConstructFromRange
, deque_char
, std::deque
<char>{}, getRandomIntegerInputs
<char>)
36 BENCHMARK_CAPTURE(BM_ConstructFromRange
, deque_size_t
, std::deque
<size_t>{}, getRandomIntegerInputs
<size_t>)
39 BENCHMARK_CAPTURE(BM_ConstructFromRange
, deque_string
, std::deque
<std::string
>{}, getRandomStringInputs
)