catch_outlier_classification.hpp 987 B

1234567891011121314151617181920212223242526272829
  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. // Outlier information
  9. #ifndef TWOBLUECUBES_CATCH_OUTLIERS_HPP_INCLUDED
  10. #define TWOBLUECUBES_CATCH_OUTLIERS_HPP_INCLUDED
  11. namespace Catch {
  12. namespace Benchmark {
  13. struct OutlierClassification {
  14. int samples_seen = 0;
  15. int low_severe = 0; // more than 3 times IQR below Q1
  16. int low_mild = 0; // 1.5 to 3 times IQR below Q1
  17. int high_mild = 0; // 1.5 to 3 times IQR above Q3
  18. int high_severe = 0; // more than 3 times IQR above Q3
  19. int total() const {
  20. return low_severe + low_mild + high_mild + high_severe;
  21. }
  22. };
  23. } // namespace Benchmark
  24. } // namespace Catch
  25. #endif // TWOBLUECUBES_CATCH_OUTLIERS_HPP_INCLUDED