xref: /aosp_15_r20/external/libcxx/utils/google-benchmark/src/benchmark_runner.h (revision 58b9f456b02922dfdb1fad8a988d5fd8765ecb80)
1*58b9f456SAndroid Build Coastguard Worker // Copyright 2015 Google Inc. All rights reserved.
2*58b9f456SAndroid Build Coastguard Worker //
3*58b9f456SAndroid Build Coastguard Worker // Licensed under the Apache License, Version 2.0 (the "License");
4*58b9f456SAndroid Build Coastguard Worker // you may not use this file except in compliance with the License.
5*58b9f456SAndroid Build Coastguard Worker // You may obtain a copy of the License at
6*58b9f456SAndroid Build Coastguard Worker //
7*58b9f456SAndroid Build Coastguard Worker //     http://www.apache.org/licenses/LICENSE-2.0
8*58b9f456SAndroid Build Coastguard Worker //
9*58b9f456SAndroid Build Coastguard Worker // Unless required by applicable law or agreed to in writing, software
10*58b9f456SAndroid Build Coastguard Worker // distributed under the License is distributed on an "AS IS" BASIS,
11*58b9f456SAndroid Build Coastguard Worker // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*58b9f456SAndroid Build Coastguard Worker // See the License for the specific language governing permissions and
13*58b9f456SAndroid Build Coastguard Worker // limitations under the License.
14*58b9f456SAndroid Build Coastguard Worker 
15*58b9f456SAndroid Build Coastguard Worker #ifndef BENCHMARK_RUNNER_H_
16*58b9f456SAndroid Build Coastguard Worker #define BENCHMARK_RUNNER_H_
17*58b9f456SAndroid Build Coastguard Worker 
18*58b9f456SAndroid Build Coastguard Worker #include "benchmark_api_internal.h"
19*58b9f456SAndroid Build Coastguard Worker #include "internal_macros.h"
20*58b9f456SAndroid Build Coastguard Worker 
21*58b9f456SAndroid Build Coastguard Worker DECLARE_double(benchmark_min_time);
22*58b9f456SAndroid Build Coastguard Worker 
23*58b9f456SAndroid Build Coastguard Worker DECLARE_int32(benchmark_repetitions);
24*58b9f456SAndroid Build Coastguard Worker 
25*58b9f456SAndroid Build Coastguard Worker DECLARE_bool(benchmark_report_aggregates_only);
26*58b9f456SAndroid Build Coastguard Worker 
27*58b9f456SAndroid Build Coastguard Worker DECLARE_bool(benchmark_display_aggregates_only);
28*58b9f456SAndroid Build Coastguard Worker 
29*58b9f456SAndroid Build Coastguard Worker namespace benchmark {
30*58b9f456SAndroid Build Coastguard Worker 
31*58b9f456SAndroid Build Coastguard Worker namespace internal {
32*58b9f456SAndroid Build Coastguard Worker 
33*58b9f456SAndroid Build Coastguard Worker extern MemoryManager* memory_manager;
34*58b9f456SAndroid Build Coastguard Worker 
35*58b9f456SAndroid Build Coastguard Worker struct RunResults {
36*58b9f456SAndroid Build Coastguard Worker   std::vector<BenchmarkReporter::Run> non_aggregates;
37*58b9f456SAndroid Build Coastguard Worker   std::vector<BenchmarkReporter::Run> aggregates_only;
38*58b9f456SAndroid Build Coastguard Worker 
39*58b9f456SAndroid Build Coastguard Worker   bool display_report_aggregates_only = false;
40*58b9f456SAndroid Build Coastguard Worker   bool file_report_aggregates_only = false;
41*58b9f456SAndroid Build Coastguard Worker };
42*58b9f456SAndroid Build Coastguard Worker 
43*58b9f456SAndroid Build Coastguard Worker RunResults RunBenchmark(
44*58b9f456SAndroid Build Coastguard Worker     const benchmark::internal::BenchmarkInstance& b,
45*58b9f456SAndroid Build Coastguard Worker     std::vector<BenchmarkReporter::Run>* complexity_reports);
46*58b9f456SAndroid Build Coastguard Worker 
47*58b9f456SAndroid Build Coastguard Worker }  // namespace internal
48*58b9f456SAndroid Build Coastguard Worker 
49*58b9f456SAndroid Build Coastguard Worker }  // end namespace benchmark
50*58b9f456SAndroid Build Coastguard Worker 
51*58b9f456SAndroid Build Coastguard Worker #endif  // BENCHMARK_RUNNER_H_
52