Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-16 08:52:10

0001 
0002 //              Copyright Catch2 Authors
0003 // Distributed under the Boost Software License, Version 1.0.
0004 //   (See accompanying file LICENSE.txt or copy at
0005 //        https://www.boost.org/LICENSE_1_0.txt)
0006 
0007 // SPDX-License-Identifier: BSL-1.0
0008 #ifndef CATCH_BENCHMARK_STATS_HPP_INCLUDED
0009 #define CATCH_BENCHMARK_STATS_HPP_INCLUDED
0010 
0011 #include <catch2/benchmark/catch_estimate.hpp>
0012 #include <catch2/benchmark/catch_outlier_classification.hpp>
0013 // The fwd decl & default specialization needs to be seen by VS2017 before
0014 // BenchmarkStats itself, or VS2017 will report compilation error.
0015 #include <catch2/benchmark/detail/catch_benchmark_stats_fwd.hpp>
0016 
0017 #include <string>
0018 #include <vector>
0019 
0020 namespace Catch {
0021 
0022     struct BenchmarkInfo {
0023         std::string name;
0024         double estimatedDuration;
0025         int iterations;
0026         unsigned int samples;
0027         unsigned int resamples;
0028         double clockResolution;
0029         double clockCost;
0030     };
0031 
0032     // We need to keep template parameter for backwards compatibility,
0033     // but we also do not want to use the template paraneter.
0034     template <class Dummy>
0035     struct BenchmarkStats {
0036         BenchmarkInfo info;
0037 
0038         std::vector<Benchmark::FDuration> samples;
0039         Benchmark::Estimate<Benchmark::FDuration> mean;
0040         Benchmark::Estimate<Benchmark::FDuration> standardDeviation;
0041         Benchmark::OutlierClassification outliers;
0042         double outlierVariance;
0043     };
0044 
0045 
0046 } // end namespace Catch
0047 
0048 #endif // CATCH_BENCHMARK_STATS_HPP_INCLUDED