cb66c5d68e
bazel / bazel.ubuntu-latest (push) Failing after 1s
build-and-test-perfcounters / ubuntu-latest.Debug (push) Failing after 0s
build-and-test-perfcounters / ubuntu-latest.Release (push) Failing after 1s
doxygen / Build HTML documentation (push) Failing after 1s
python + Bazel pre-commit checks / pre-commit (push) Failing after 1s
sanitizer / tsan.Debug (push) Failing after 1s
sanitizer / ubsan.Debug (push) Failing after 0s
sanitizer / ubsan.RelWithDebInfo (push) Failing after 1s
build-and-test-min-cmake / ubuntu-latest.min-cmake (push) Failing after 1s
clang-format-lint / check-clang-format (push) Failing after 1s
sanitizer / asan.Debug (push) Failing after 1s
sanitizer / msan.RelWithDebInfo (push) Failing after 1s
clang-tidy / run-clang-tidy (push) Failing after 1s
sanitizer / msan.Debug (push) Failing after 1s
sanitizer / asan.RelWithDebInfo (push) Failing after 0s
sanitizer / tsan.RelWithDebInfo (push) Failing after 0s
test-bindings / Test Rust bindings on ubuntu-latest (push) Failing after 0s
test-bindings / Test Python 3.10 bindings on ubuntu-latest (push) Failing after 0s
test-bindings / Test Python 3.11 bindings on ubuntu-latest (push) Failing after 0s
test-bindings / Test Python 3.12 bindings on ubuntu-latest (push) Failing after 1s
test-bindings / Test Python 3.13 bindings on ubuntu-latest (push) Failing after 0s
build-and-test / macos-latest.Debug.shared.clang++ (push) Has been cancelled
build-and-test / ubuntu-22.04.Debug.shared.clang++ (push) Has been cancelled
build-and-test / ubuntu-24.04.Debug.shared.clang++ (push) Has been cancelled
build-and-test / ubuntu-24.04-arm.Debug.shared.clang++ (push) Has been cancelled
bazel / bazel.macos-latest (push) Has been cancelled
bazel / bazel.windows-latest (push) Has been cancelled
build-and-test-min-cmake / macos-latest.min-cmake (push) Has been cancelled
build-and-test / ubuntu-22.04.Debug.static.clang++ (push) Has been cancelled
build-and-test / macos-latest.Debug.shared.g++ (push) Has been cancelled
build-and-test / ubuntu-22.04.Debug.shared.g++ (push) Has been cancelled
build-and-test / ubuntu-24.04.Debug.shared.g++ (push) Has been cancelled
build-and-test / ubuntu-24.04-arm.Debug.shared.g++ (push) Has been cancelled
build-and-test / macos-latest.Debug.static.g++ (push) Has been cancelled
build-and-test / ubuntu-22.04.Debug.static.g++ (push) Has been cancelled
build-and-test / ubuntu-24.04.Debug.static.g++ (push) Has been cancelled
build-and-test / ubuntu-24.04-arm.Debug.static.g++ (push) Has been cancelled
build-and-test / macos-latest.Release.shared.clang++ (push) Has been cancelled
build-and-test / ubuntu-22.04.Release.shared.clang++ (push) Has been cancelled
build-and-test / ubuntu-24.04.Release.shared.clang++ (push) Has been cancelled
build-and-test / ubuntu-24.04-arm.Release.shared.clang++ (push) Has been cancelled
build-and-test / macos-latest.Release.static.clang++ (push) Has been cancelled
build-and-test / ubuntu-22.04.Release.static.clang++ (push) Has been cancelled
build-and-test / macos-latest.Debug.static.clang++ (push) Has been cancelled
build-and-test / ubuntu-24.04.Debug.static.clang++ (push) Has been cancelled
build-and-test / ubuntu-24.04-arm.Debug.static.clang++ (push) Has been cancelled
build-and-test / macos-latest.Release.static.g++ (push) Has been cancelled
build-and-test / ubuntu-22.04.Release.static.g++ (push) Has been cancelled
build-and-test / windows-2025.Debug.static.VS-18-2025 (push) Has been cancelled
build-and-test / windows-2022.Release.shared.VS-17-2022 (push) Has been cancelled
build-and-test / windows-2022.Release.static.VS-17-2022 (push) Has been cancelled
build-and-test / windows-2025.Release.shared.VS-18-2025 (push) Has been cancelled
build-and-test / windows-2025.Release.static.VS-18-2025 (push) Has been cancelled
build-and-test / windows-latest.Debug.shared.CLANG64 (push) Has been cancelled
build-and-test / windows-latest.Debug.shared.MINGW64 (push) Has been cancelled
build-and-test / windows-latest.Debug.shared.UCRT64 (push) Has been cancelled
build-and-test / windows-latest.Debug.static.CLANG64 (push) Has been cancelled
build-and-test / windows-latest.Debug.static.MINGW64 (push) Has been cancelled
build-and-test / windows-latest.Debug.static.UCRT64 (push) Has been cancelled
build-and-test / ubuntu-24.04.Release.static.clang++ (push) Has been cancelled
build-and-test / ubuntu-24.04-arm.Release.static.clang++ (push) Has been cancelled
build-and-test / macos-latest.Release.shared.g++ (push) Has been cancelled
build-and-test / ubuntu-22.04.Release.shared.g++ (push) Has been cancelled
build-and-test / ubuntu-24.04.Release.shared.g++ (push) Has been cancelled
build-and-test / ubuntu-24.04-arm.Release.shared.g++ (push) Has been cancelled
build-and-test / ubuntu-24.04.Release.static.g++ (push) Has been cancelled
build-and-test / ubuntu-24.04-arm.Release.static.g++ (push) Has been cancelled
build-and-test / windows-2022.Debug.shared.VS-17-2022 (push) Has been cancelled
build-and-test / windows-2022.Debug.static.VS-17-2022 (push) Has been cancelled
build-and-test / windows-2025.Debug.shared.VS-18-2025 (push) Has been cancelled
build-and-test / windows-latest.Release.static.MINGW64 (push) Has been cancelled
build-and-test / windows-latest.Release.static.UCRT64 (push) Has been cancelled
test-bindings / Test Python 3.10 bindings on macos-latest (push) Has been cancelled
test-bindings / Test Python 3.11 bindings on macos-latest (push) Has been cancelled
test-bindings / Test Python 3.12 bindings on macos-latest (push) Has been cancelled
test-bindings / Test Python 3.13 bindings on macos-latest (push) Has been cancelled
build-and-test / windows-latest.Release.shared.CLANG64 (push) Has been cancelled
build-and-test / windows-latest.Release.shared.MINGW64 (push) Has been cancelled
build-and-test / windows-latest.Release.shared.UCRT64 (push) Has been cancelled
build-and-test / windows-latest.Release.static.CLANG64 (push) Has been cancelled
test-bindings / Test Python 3.12 bindings on windows-latest (push) Has been cancelled
test-bindings / Test Python 3.13 bindings on windows-latest (push) Has been cancelled
test-bindings / Test Python 3.10 bindings on windows-latest (push) Has been cancelled
test-bindings / Test Python 3.11 bindings on windows-latest (push) Has been cancelled
test-bindings / Test Rust bindings on macos-latest (push) Has been cancelled
test-bindings / Test Rust bindings on windows-latest (push) Has been cancelled
93 lines
3.0 KiB
C++
93 lines
3.0 KiB
C++
#ifndef BENCHMARK_API_INTERNAL_H
|
|
#define BENCHMARK_API_INTERNAL_H
|
|
|
|
#include <cmath>
|
|
#include <iosfwd>
|
|
#include <limits>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "benchmark/benchmark_api.h"
|
|
#include "benchmark/reporter.h"
|
|
#include "benchmark/sysinfo.h"
|
|
#include "commandlineflags.h"
|
|
|
|
namespace benchmark {
|
|
namespace internal {
|
|
|
|
// Information kept per benchmark we may want to run
|
|
class BenchmarkInstance {
|
|
public:
|
|
BenchmarkInstance(benchmark::Benchmark* benchmark, int family_idx,
|
|
int per_family_instance_idx,
|
|
const std::vector<int64_t>& args, int thread_count);
|
|
|
|
const BenchmarkName& name() const { return name_; }
|
|
int family_index() const { return family_index_; }
|
|
int per_family_instance_index() const { return per_family_instance_index_; }
|
|
AggregationReportMode aggregation_report_mode() const {
|
|
return aggregation_report_mode_;
|
|
}
|
|
TimeUnit time_unit() const { return time_unit_; }
|
|
bool measure_process_cpu_time() const { return measure_process_cpu_time_; }
|
|
bool use_real_time() const { return use_real_time_; }
|
|
bool use_manual_time() const { return use_manual_time_; }
|
|
BigO complexity() const { return complexity_; }
|
|
BigOFunc* complexity_lambda() const { return complexity_lambda_; }
|
|
const std::vector<Statistics>& statistics() const { return statistics_; }
|
|
int repetitions() const { return repetitions_; }
|
|
double min_time() const { return min_time_; }
|
|
double min_warmup_time() const { return min_warmup_time_; }
|
|
IterationCount iterations() const { return iterations_; }
|
|
int threads() const { return threads_; }
|
|
void Setup() const;
|
|
void Teardown() const;
|
|
const auto& GetUserThreadRunnerFactory() const {
|
|
return benchmark_.threadrunner_;
|
|
}
|
|
|
|
State Run(IterationCount iters, int thread_id, internal::ThreadTimer* timer,
|
|
internal::ThreadManager* manager,
|
|
internal::PerfCountersMeasurement* perf_counters_measurement,
|
|
ProfilerManager* profiler_manager) const;
|
|
|
|
private:
|
|
BenchmarkName name_;
|
|
benchmark::Benchmark& benchmark_;
|
|
const int family_index_;
|
|
const int per_family_instance_index_;
|
|
AggregationReportMode aggregation_report_mode_;
|
|
const std::vector<int64_t>& args_;
|
|
TimeUnit time_unit_;
|
|
bool measure_process_cpu_time_;
|
|
bool use_real_time_;
|
|
bool use_manual_time_;
|
|
BigO complexity_;
|
|
BigOFunc* complexity_lambda_;
|
|
UserCounters counters_;
|
|
const std::vector<Statistics>& statistics_;
|
|
int repetitions_;
|
|
double min_time_;
|
|
double min_warmup_time_;
|
|
IterationCount iterations_;
|
|
int threads_; // Number of concurrent threads to us
|
|
|
|
callback_function setup_;
|
|
callback_function teardown_;
|
|
};
|
|
|
|
bool FindBenchmarksInternal(const std::string& re,
|
|
std::vector<BenchmarkInstance>* benchmarks,
|
|
std::ostream* Err);
|
|
|
|
bool IsZero(double n);
|
|
|
|
BENCHMARK_EXPORT
|
|
ConsoleReporter::OutputOptions GetOutputOptions(bool force_no_color = false);
|
|
|
|
} // end namespace internal
|
|
} // end namespace benchmark
|
|
|
|
#endif // BENCHMARK_API_INTERNAL_H
|