catch_estimate.hpp 912 B

12345678910111213141516171819202122232425262728293031
  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. // Statistics estimates
  9. #ifndef TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
  10. #define TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
  11. namespace Catch {
  12. namespace Benchmark {
  13. template <typename Duration>
  14. struct Estimate {
  15. Duration point;
  16. Duration lower_bound;
  17. Duration upper_bound;
  18. double confidence_interval;
  19. template <typename Duration2>
  20. operator Estimate<Duration2>() const {
  21. return { point, lower_bound, upper_bound, confidence_interval };
  22. }
  23. };
  24. } // namespace Benchmark
  25. } // namespace Catch
  26. #endif // TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED