blob: 0025a335ccf253b18638689fd258e42b6c7d422f [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
Nico Weberfa647f82019-08-21 01:59:12 +000014#include "ContainerBenchmarks.h"
15#include "GenerateInput.h"
Eric Fiselierc52db212019-08-12 07:51:05 +000016
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();