mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Cleanup benchmarking includes
This commit is contained in:
parent
d0f70fdfd6
commit
b3ebce715e
@ -10,23 +10,26 @@
|
|||||||
#ifndef CATCH_BENCHMARK_HPP_INCLUDED
|
#ifndef CATCH_BENCHMARK_HPP_INCLUDED
|
||||||
#define CATCH_BENCHMARK_HPP_INCLUDED
|
#define CATCH_BENCHMARK_HPP_INCLUDED
|
||||||
|
|
||||||
#include <catch2/interfaces/catch_interfaces_config.hpp>
|
#include <catch2/catch_user_config.hpp>
|
||||||
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
||||||
#include <catch2/internal/catch_context.hpp>
|
#include <catch2/internal/catch_context.hpp>
|
||||||
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
|
|
||||||
#include <catch2/internal/catch_unique_name.hpp>
|
|
||||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||||
#include <catch2/benchmark/catch_chronometer.hpp>
|
#include <catch2/internal/catch_test_failure_exception.hpp>
|
||||||
|
#include <catch2/internal/catch_unique_name.hpp>
|
||||||
|
#include <catch2/interfaces/catch_interfaces_capture.hpp>
|
||||||
|
#include <catch2/interfaces/catch_interfaces_config.hpp>
|
||||||
|
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||||
|
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
|
||||||
#include <catch2/benchmark/catch_clock.hpp>
|
#include <catch2/benchmark/catch_clock.hpp>
|
||||||
#include <catch2/benchmark/catch_environment.hpp>
|
#include <catch2/benchmark/catch_environment.hpp>
|
||||||
#include <catch2/benchmark/catch_execution_plan.hpp>
|
#include <catch2/benchmark/catch_execution_plan.hpp>
|
||||||
#include <catch2/benchmark/detail/catch_estimate_clock.hpp>
|
#include <catch2/benchmark/detail/catch_estimate_clock.hpp>
|
||||||
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
|
|
||||||
#include <catch2/benchmark/detail/catch_analyse.hpp>
|
#include <catch2/benchmark/detail/catch_analyse.hpp>
|
||||||
#include <catch2/benchmark/detail/catch_benchmark_function.hpp>
|
#include <catch2/benchmark/detail/catch_benchmark_function.hpp>
|
||||||
#include <catch2/benchmark/detail/catch_run_for_at_least.hpp>
|
#include <catch2/benchmark/detail/catch_run_for_at_least.hpp>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <chrono>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -82,7 +85,7 @@ namespace Catch {
|
|||||||
auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end());
|
auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end());
|
||||||
BenchmarkStats<FloatDuration<Clock>> stats{ CATCH_MOVE(info), CATCH_MOVE(analysis.samples), analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };
|
BenchmarkStats<FloatDuration<Clock>> stats{ CATCH_MOVE(info), CATCH_MOVE(analysis.samples), analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };
|
||||||
getResultCapture().benchmarkEnded(stats);
|
getResultCapture().benchmarkEnded(stats);
|
||||||
} CATCH_CATCH_ANON (TestFailureException) {
|
} CATCH_CATCH_ANON (TestFailureException const&) {
|
||||||
getResultCapture().benchmarkFailed("Benchmark failed due to failed assertion"_sr);
|
getResultCapture().benchmarkFailed("Benchmark failed due to failed assertion"_sr);
|
||||||
} CATCH_CATCH_ALL{
|
} CATCH_CATCH_ALL{
|
||||||
getResultCapture().benchmarkFailed(translateActiveException());
|
getResultCapture().benchmarkFailed(translateActiveException());
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
#include <catch2/benchmark/catch_clock.hpp>
|
#include <catch2/benchmark/catch_clock.hpp>
|
||||||
#include <catch2/benchmark/catch_optimizer.hpp>
|
#include <catch2/benchmark/catch_optimizer.hpp>
|
||||||
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
|
|
||||||
#include <catch2/internal/catch_meta.hpp>
|
#include <catch2/internal/catch_meta.hpp>
|
||||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#ifndef CATCH_ANALYSE_HPP_INCLUDED
|
#ifndef CATCH_ANALYSE_HPP_INCLUDED
|
||||||
#define CATCH_ANALYSE_HPP_INCLUDED
|
#define CATCH_ANALYSE_HPP_INCLUDED
|
||||||
|
|
||||||
#include <catch2/benchmark/catch_clock.hpp>
|
|
||||||
#include <catch2/benchmark/catch_environment.hpp>
|
#include <catch2/benchmark/catch_environment.hpp>
|
||||||
#include <catch2/benchmark/catch_sample_analysis.hpp>
|
#include <catch2/benchmark/catch_sample_analysis.hpp>
|
||||||
#include <catch2/benchmark/detail/catch_stats.hpp>
|
#include <catch2/benchmark/detail/catch_stats.hpp>
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#define CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED
|
#define CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED
|
||||||
|
|
||||||
#include <catch2/benchmark/catch_chronometer.hpp>
|
#include <catch2/benchmark/catch_chronometer.hpp>
|
||||||
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
|
|
||||||
#include <catch2/internal/catch_meta.hpp>
|
#include <catch2/internal/catch_meta.hpp>
|
||||||
#include <catch2/internal/catch_unique_ptr.hpp>
|
#include <catch2/internal/catch_unique_ptr.hpp>
|
||||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||||
|
@ -10,14 +10,9 @@
|
|||||||
#ifndef CATCH_COMPLETE_INVOKE_HPP_INCLUDED
|
#ifndef CATCH_COMPLETE_INVOKE_HPP_INCLUDED
|
||||||
#define CATCH_COMPLETE_INVOKE_HPP_INCLUDED
|
#define CATCH_COMPLETE_INVOKE_HPP_INCLUDED
|
||||||
|
|
||||||
#include <catch2/internal/catch_test_failure_exception.hpp>
|
|
||||||
#include <catch2/internal/catch_meta.hpp>
|
#include <catch2/internal/catch_meta.hpp>
|
||||||
#include <catch2/interfaces/catch_interfaces_capture.hpp>
|
|
||||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
|
||||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||||
|
|
||||||
#include <type_traits>
|
|
||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
namespace Benchmark {
|
namespace Benchmark {
|
||||||
namespace Detail {
|
namespace Detail {
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#ifndef CATCH_MEASURE_HPP_INCLUDED
|
#ifndef CATCH_MEASURE_HPP_INCLUDED
|
||||||
#define CATCH_MEASURE_HPP_INCLUDED
|
#define CATCH_MEASURE_HPP_INCLUDED
|
||||||
|
|
||||||
#include <catch2/benchmark/catch_clock.hpp>
|
|
||||||
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
|
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
|
||||||
#include <catch2/benchmark/detail/catch_timing.hpp>
|
#include <catch2/benchmark/detail/catch_timing.hpp>
|
||||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||||
|
@ -7,9 +7,10 @@
|
|||||||
// SPDX-License-Identifier: BSL-1.0
|
// SPDX-License-Identifier: BSL-1.0
|
||||||
|
|
||||||
#include <catch2/benchmark/detail/catch_run_for_at_least.hpp>
|
#include <catch2/benchmark/detail/catch_run_for_at_least.hpp>
|
||||||
#include <exception>
|
|
||||||
#include <catch2/internal/catch_enforce.hpp>
|
#include <catch2/internal/catch_enforce.hpp>
|
||||||
|
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
namespace Benchmark {
|
namespace Benchmark {
|
||||||
namespace Detail {
|
namespace Detail {
|
||||||
|
Loading…
Reference in New Issue
Block a user