Toolbox
snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
toolbox
bm
Record.hpp
Go to the documentation of this file.
1
// The Reactive C++ Toolbox.
2
// Copyright (C) 2021 Reactive Markets Limited
3
//
4
// Licensed under the Apache License, Version 2.0 (the "License");
5
// you may not use this file except in compliance with the License.
6
// You may obtain a copy of the License at
7
//
8
// http://www.apache.org/licenses/LICENSE-2.0
9
//
10
// Unless required by applicable law or agreed to in writing, software
11
// distributed under the License is distributed on an "AS IS" BASIS,
12
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
// See the License for the specific language governing permissions and
14
// limitations under the License.
15
16
#ifndef TOOLBOX_BM_RECORD
17
#define TOOLBOX_BM_RECORD
18
19
#include <
toolbox/Config.h
>
20
21
#include <chrono>
22
23
namespace
toolbox
{
24
inline
namespace
hdr {
25
class
Histogram;
26
}
// namespace hdr
27
}
// namespace toolbox
28
29
namespace
toolbox::bm
{
30
34
class
TOOLBOX_API
BenchmarkRecord
{
35
public
:
36
BenchmarkRecord
(
Histogram
& hist,
int
count = 1)
noexcept
;
// NOLINT(hicpp-explicit-conversions)
37
~BenchmarkRecord
();
38
39
// Copy.
40
BenchmarkRecord
(
const
BenchmarkRecord
&) =
delete
;
41
BenchmarkRecord
&
operator=
(
const
BenchmarkRecord
&) =
delete
;
42
43
// Move.
44
BenchmarkRecord
(
BenchmarkRecord
&&) =
delete
;
45
BenchmarkRecord
&
operator=
(
BenchmarkRecord
&&) =
delete
;
46
47
private
:
48
Histogram
& hist_;
49
const
int
count_;
50
std::chrono::time_point<std::chrono::high_resolution_clock> start_;
51
};
52
53
}
// namespace toolbox::bm
54
55
#endif
// TOOLBOX_BM_RECORD
Config.h
TOOLBOX_API
#define TOOLBOX_API
Definition
Config.h:39
toolbox::bm::BenchmarkRecord
Definition
Record.hpp:34
toolbox::bm::BenchmarkRecord::BenchmarkRecord
BenchmarkRecord(BenchmarkRecord &&)=delete
toolbox::bm::BenchmarkRecord::operator=
BenchmarkRecord & operator=(BenchmarkRecord &&)=delete
toolbox::bm::BenchmarkRecord::operator=
BenchmarkRecord & operator=(const BenchmarkRecord &)=delete
toolbox::bm::BenchmarkRecord::BenchmarkRecord
BenchmarkRecord(const BenchmarkRecord &)=delete
toolbox::Histogram
A High Dynamic Range (HDR) Histogram.
Definition
Histogram.hpp:64
toolbox::bm
Definition
Benchmark.cpp:26
toolbox
Definition
Benchmark.cpp:26
Generated by
1.9.8