• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Created by Joachim on 16/04/2019.
3  *  Adapted from donated nonius code.
4  *
5  *  Distributed under the Boost Software License, Version 1.0. (See accompanying
6  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7  */
8 
9  // Statistics estimates
10 
11 #ifndef TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
12 #define TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
13 
14 namespace Catch {
15     namespace Benchmark {
16         template <typename Duration>
17         struct Estimate {
18             Duration point;
19             Duration lower_bound;
20             Duration upper_bound;
21             double confidence_interval;
22 
23             template <typename Duration2>
operator Estimate<Duration2>Catch::Benchmark::Estimate24             operator Estimate<Duration2>() const {
25                 return { point, lower_bound, upper_bound, confidence_interval };
26             }
27         };
28     } // namespace Benchmark
29 } // namespace Catch
30 
31 #endif // TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
32