1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include <deque>
10 
11 #include "benchmark/benchmark.h"
12 
13 #include "ContainerBenchmarks.h"
14 #include "GenerateInput.h"
15 
16 using namespace ContainerBenchmarks;
17 
18 constexpr std::size_t TestNumInputs = 1024;
19 
20 BENCHMARK_CAPTURE(BM_ConstructSize,
21     deque_byte,
22     std::deque<unsigned char>{})->Arg(5140480);
23 
24 BENCHMARK_CAPTURE(BM_ConstructSizeValue,
25     deque_byte,
26     std::deque<unsigned char>{}, 0)->Arg(5140480);
27 
28 BENCHMARK_CAPTURE(BM_ConstructIterIter,
29   deque_char,
30   std::deque<char>{},
31   getRandomIntegerInputs<char>)->Arg(TestNumInputs);
32 
33 BENCHMARK_CAPTURE(BM_ConstructIterIter,
34   deque_size_t,
35   std::deque<size_t>{},
36   getRandomIntegerInputs<size_t>)->Arg(TestNumInputs);
37 
38 BENCHMARK_CAPTURE(BM_ConstructIterIter,
39   deque_string,
40   std::deque<std::string>{},
41   getRandomStringInputs)->Arg(TestNumInputs);
42 
43 
44 
45 
46 BENCHMARK_MAIN();
47