File Coverage

/usr/local/lib/perl5/site_perl/5.26.1/x86_64-linux/XS/libcatch.x/i/catch2/benchmark/detail/catch_measure.hpp
Criterion Covered Total %
statement 0 6 0.0
branch 0 8 0.0
condition n/a
subroutine n/a
pod n/a
total 0 14 0.0


line stmt bran cond sub pod time code
1              
2             // Copyright Catch2 Authors
3             // Distributed under the Boost Software License, Version 1.0.
4             // (See accompanying file LICENSE_1_0.txt or copy at
5             // https://www.boost.org/LICENSE_1_0.txt)
6              
7             // SPDX-License-Identifier: BSL-1.0
8             // Adapted from donated nonius code.
9              
10             #ifndef CATCH_MEASURE_HPP_INCLUDED
11             #define CATCH_MEASURE_HPP_INCLUDED
12              
13             #include
14             #include
15             #include
16             #include
17              
18             namespace Catch {
19             namespace Benchmark {
20             namespace Detail {
21             template
22 0           TimingOf measure(Fun&& fun, Args&&... args) {
23 0           auto start = Clock::now();
24 0 0         auto&& r = Detail::complete_invoke(fun, CATCH_FORWARD(args)...);
    0          
    0          
    0          
25 0           auto end = Clock::now();
26 0           auto delta = end - start;
27 0           return { delta, CATCH_FORWARD(r), 1 };
28             }
29             } // namespace Detail
30             } // namespace Benchmark
31             } // namespace Catch
32              
33             #endif // CATCH_MEASURE_HPP_INCLUDED