blob: 61b45cbf4ecd7ff468714b52bfc958e77790398e [file] [log] [blame]
Eric Fiselierc52db212019-08-12 07:51:05 +00001//===----------------------------------------------------------------------===//
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
Nico Weberfa647f82019-08-21 01:59:12 +000013#include "ContainerBenchmarks.h"
14#include "GenerateInput.h"
Eric Fiselierc52db212019-08-12 07:51:05 +000015
16using namespace ContainerBenchmarks;
17
18constexpr std::size_t TestNumInputs = 1024;
19
20BENCHMARK_CAPTURE(BM_ConstructSize,
21 deque_byte,
22 std::deque<unsigned char>{})->Arg(5140480);
23
24BENCHMARK_CAPTURE(BM_ConstructSizeValue,
25 deque_byte,
26 std::deque<unsigned char>{}, 0)->Arg(5140480);
27
28BENCHMARK_CAPTURE(BM_ConstructIterIter,
29 deque_char,
30 std::deque<char>{},
31 getRandomIntegerInputs<char>)->Arg(TestNumInputs);
32
33BENCHMARK_CAPTURE(BM_ConstructIterIter,
34 deque_size_t,
35 std::deque<size_t>{},
36 getRandomIntegerInputs<size_t>)->Arg(TestNumInputs);
37
38BENCHMARK_CAPTURE(BM_ConstructIterIter,
39 deque_string,
40 std::deque<std::string>{},
41 getRandomStringInputs)->Arg(TestNumInputs);
42
43
44
45
46BENCHMARK_MAIN();