CppBenchmark
1.0.4.0
C++ Benchmark Library
include
benchmark
benchmark.h
Go to the documentation of this file.
1
9
#ifndef CPPBENCHMARK_BENCHMARK_H
10
#define CPPBENCHMARK_BENCHMARK_H
11
12
#include "
benchmark/benchmark_base.h
"
13
#include "
benchmark/fixture.h
"
14
15
namespace
CppBenchmark
{
16
18
21
class
Benchmark
:
public
BenchmarkBase
,
public
virtual
Fixture
22
{
23
public
:
25
typedef
Settings
TSettings
;
26
28
32
template
<
typename
... Types>
33
explicit
Benchmark
(
const
std::string&
name
, Types...
settings
) :
Benchmark
(
name
,
TSettings
(
settings
...)) {}
35
39
explicit
Benchmark
(
const
std::string&
name
,
const
TSettings
&
settings
) :
BenchmarkBase
(
name
,
settings
) {}
40
Benchmark
(
const
Benchmark
&) =
delete
;
41
Benchmark
(
Benchmark
&&) =
delete
;
42
virtual
~Benchmark
() =
default
;
43
44
Benchmark
&
operator=
(
const
Benchmark
&) =
delete
;
45
Benchmark
&
operator=
(
Benchmark
&&) =
delete
;
46
47
protected
:
49
54
virtual
void
Run
(
Context
& context) = 0;
55
56
private
:
57
int
CountLaunches()
const override
;
58
void
Launch(
int
& current,
int
total,
LauncherHandler
& handler)
override
;
59
};
60
69
}
// namespace CppBenchmark
70
71
#endif
// CPPBENCHMARK_BENCHMARK_H
benchmark_base.h
Benchmark base definition.
CppBenchmark::BenchmarkBase
Benchmark base class.
Definition:
benchmark_base.h:25
CppBenchmark::BenchmarkBase::settings
const Settings & settings() const
Get benchmark settings.
Definition:
benchmark_base.h:57
CppBenchmark::BenchmarkBase::name
const std::string & name() const
Get benchmark name.
Definition:
benchmark_base.h:55
CppBenchmark::Benchmark
Benchmark class.
Definition:
benchmark.h:22
CppBenchmark::Benchmark::operator=
Benchmark & operator=(Benchmark &&)=delete
CppBenchmark::Benchmark::operator=
Benchmark & operator=(const Benchmark &)=delete
CppBenchmark::Benchmark::TSettings
Settings TSettings
Benchmark settings type.
Definition:
benchmark.h:25
CppBenchmark::Benchmark::Benchmark
Benchmark(const std::string &name, Types... settings)
Default class constructor.
Definition:
benchmark.h:33
CppBenchmark::Benchmark::Benchmark
Benchmark(const std::string &name, const TSettings &settings)
Alternative class constructor.
Definition:
benchmark.h:39
CppBenchmark::Benchmark::~Benchmark
virtual ~Benchmark()=default
CppBenchmark::Benchmark::Run
virtual void Run(Context &context)=0
Benchmark run method.
CppBenchmark::Benchmark::Benchmark
Benchmark(const Benchmark &)=delete
CppBenchmark::Benchmark::Benchmark
Benchmark(Benchmark &&)=delete
CppBenchmark::Context
Benchmark running context.
Definition:
context.h:27
CppBenchmark::Fixture
Benchmark fixture.
Definition:
fixture.h:21
CppBenchmark::LauncherHandler
Launcher handler.
Definition:
launcher_handler.h:22
CppBenchmark::Settings
Benchmark settings.
Definition:
settings.h:32
fixture.h
Benchmark fixture definition.
CppBenchmark
C++ Benchmark project definitions.
Definition:
barrier.h:15
Generated by
1.9.1