blob: 44a492b7b3d15ae3ae7aa44e1002d477f02dc744 [file] [log] [blame]
Eric Fiselierc52db212019-08-12 07:51:05 +00001// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#include <deque>
11
12#include "benchmark/benchmark.h"
13
14#include "ContainerBenchmarks.hpp"
15#include "GenerateInput.hpp"
16
17using namespace ContainerBenchmarks;
18
19constexpr std::size_t TestNumInputs = 1024;
20
21BENCHMARK_CAPTURE(BM_ConstructSize,
22 deque_byte,
23 std::deque<unsigned char>{})->Arg(5140480);
24
25BENCHMARK_CAPTURE(BM_ConstructSizeValue,
26 deque_byte,
27 std::deque<unsigned char>{}, 0)->Arg(5140480);
28
29BENCHMARK_CAPTURE(BM_ConstructIterIter,
30 deque_char,
31 std::deque<char>{},
32 getRandomIntegerInputs<char>)->Arg(TestNumInputs);
33
34BENCHMARK_CAPTURE(BM_ConstructIterIter,
35 deque_size_t,
36 std::deque<size_t>{},
37 getRandomIntegerInputs<size_t>)->Arg(TestNumInputs);
38
39BENCHMARK_CAPTURE(BM_ConstructIterIter,
40 deque_string,
41 std::deque<std::string>{},
42 getRandomStringInputs)->Arg(TestNumInputs);
43
44
45
46
47BENCHMARK_MAIN();