Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
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
23namespace toolbox {
24inline namespace hdr {
25class Histogram;
26} // namespace hdr
27} // namespace toolbox
28
29namespace toolbox::bm {
30
35 public:
36 BenchmarkRecord(Histogram& hist, int count = 1) noexcept; // NOLINT(hicpp-explicit-conversions)
38
39 // Copy.
42
43 // Move.
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
#define TOOLBOX_API
Definition Config.h:39
BenchmarkRecord(BenchmarkRecord &&)=delete
BenchmarkRecord & operator=(BenchmarkRecord &&)=delete
BenchmarkRecord & operator=(const BenchmarkRecord &)=delete
BenchmarkRecord(const BenchmarkRecord &)=delete
A High Dynamic Range (HDR) Histogram.
Definition Histogram.hpp:64