2 //===----------------------------------------------------------------------===//
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
8 //===----------------------------------------------------------------------===//
12 #include "benchmark/benchmark.h"
14 #include "ContainerBenchmarks.h"
15 #include "GenerateInput.h"
17 using namespace ContainerBenchmarks
;
19 constexpr std::size_t TestNumInputs
= 1024;
21 BENCHMARK_CAPTURE(BM_ConstructSize
,
23 std::deque
<unsigned char>{})->Arg(5140480);
25 BENCHMARK_CAPTURE(BM_ConstructSizeValue
,
27 std::deque
<unsigned char>{}, 0)->Arg(5140480);
29 BENCHMARK_CAPTURE(BM_ConstructIterIter
,
32 getRandomIntegerInputs
<char>)->Arg(TestNumInputs
);
34 BENCHMARK_CAPTURE(BM_ConstructIterIter
,
37 getRandomIntegerInputs
<size_t>)->Arg(TestNumInputs
);
39 BENCHMARK_CAPTURE(BM_ConstructIterIter
,
41 std::deque
<std::string
>{},
42 getRandomStringInputs
)->Arg(TestNumInputs
);