File indexing completed on 2025-01-30 10:02:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef CATCH_ENVIRONMENT_HPP_INCLUDED
0011 #define CATCH_ENVIRONMENT_HPP_INCLUDED
0012
0013 #include <catch2/benchmark/catch_clock.hpp>
0014 #include <catch2/benchmark/catch_outlier_classification.hpp>
0015
0016 namespace Catch {
0017 namespace Benchmark {
0018 template <typename Duration>
0019 struct EnvironmentEstimate {
0020 Duration mean;
0021 OutlierClassification outliers;
0022
0023 template <typename Duration2>
0024 operator EnvironmentEstimate<Duration2>() const {
0025 return { mean, outliers };
0026 }
0027 };
0028 template <typename Clock>
0029 struct Environment {
0030 using clock_type = Clock;
0031 EnvironmentEstimate<FloatDuration<Clock>> clock_resolution;
0032 EnvironmentEstimate<FloatDuration<Clock>> clock_cost;
0033 };
0034 }
0035 }
0036
0037 #endif