DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
profiler.hpp
Go to the documentation of this file.
1// DUNE DAQ modification notice:
2// This file has been modified from the original ATLAS oks source for the DUNE DAQ project.
3// Fork baseline commit: oks-08-03-04 (2022-04-14).
4// Renamed since fork: yes (from oks/profiler.h to include/oks/profiler.hpp).
5
6#ifndef __OKS_PROFILER
7#define __OKS_PROFILER
8
9#include <chrono>
10
11#include "oks/defs.hpp"
12
13namespace dunedaq {
14namespace oks {
15
16class OksKernel;
17
19{
20public:
59
60 friend std::ostream& operator<<(std::ostream&, const OksProfiler&);
61
62 const std::chrono::time_point<std::chrono::steady_clock> start_time_point() const { return p_start_time_point; }
63
64private:
66
67 void Start(OksProfiler::FunctionID, std::chrono::time_point<std::chrono::steady_clock>&);
68
69 void Stop(OksProfiler::FunctionID, const std::chrono::time_point<std::chrono::steady_clock>&);
70
71 std::chrono::time_point<std::chrono::steady_clock> p_start_time_point;
72
74 unsigned long c_total[(unsigned)OksProfiler::QueryOperatorFrom + 1];
75
76 friend class OksKernel;
77 friend class OksFunctionProfiler;
78};
79
81{
82public:
85
86private:
89 std::chrono::time_point<std::chrono::steady_clock> p_start_time_point;
90};
91
92} // namespace oks
93} // namespace dunedaq
94#endif
OksProfiler::FunctionID func_id
Definition profiler.hpp:88
std::chrono::time_point< std::chrono::steady_clock > p_start_time_point
Definition profiler.hpp:89
OksFunctionProfiler(OksProfiler::FunctionID, const OksKernel *)
Definition profiler.cpp:192
Provides interface to the OKS kernel.
Definition kernel.hpp:615
friend class OksFunctionProfiler
Definition profiler.hpp:77
unsigned long c_total[(unsigned) OksProfiler::QueryOperatorFrom+1]
Definition profiler.hpp:74
std::chrono::time_point< std::chrono::steady_clock > p_start_time_point
Definition profiler.hpp:71
double t_total[(unsigned) OksProfiler::QueryOperatorFrom+1]
Definition profiler.hpp:73
const std::chrono::time_point< std::chrono::steady_clock > start_time_point() const
Definition profiler.hpp:62
void Start(OksProfiler::FunctionID, std::chrono::time_point< std::chrono::steady_clock > &)
Definition profiler.cpp:179
void Stop(OksProfiler::FunctionID, const std::chrono::time_point< std::chrono::steady_clock > &)
Definition profiler.cpp:186
std::ostream & operator<<(std::ostream &s, const oks::exception &ex)
The DUNE-DAQ namespace.