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
18
20{
21public:
60
61 friend std::ostream&
62 operator<<(std::ostream&, const OksProfiler&);
63
64 const std::chrono::time_point<std::chrono::steady_clock>
66 {
67 return p_start_time_point;
68 }
69
70private:
72
73 void
74 Start(OksProfiler::FunctionID, std::chrono::time_point<std::chrono::steady_clock>&);
75
76 void
77 Stop(OksProfiler::FunctionID, const std::chrono::time_point<std::chrono::steady_clock>&);
78
79 std::chrono::time_point<std::chrono::steady_clock> p_start_time_point;
80
82 unsigned long c_total[(unsigned) OksProfiler::QueryOperatorFrom + 1];
83
84 friend class OksKernel;
85 friend class OksFunctionProfiler;
86};
87
88
90{
91public:
94
95private:
98 std::chrono::time_point<std::chrono::steady_clock> p_start_time_point;
99};
100
101} // namespace oks
102} // namespace dunedaq
103#endif
OksProfiler::FunctionID func_id
Definition profiler.hpp:97
std::chrono::time_point< std::chrono::steady_clock > p_start_time_point
Definition profiler.hpp:98
OksFunctionProfiler(OksProfiler::FunctionID, const OksKernel *)
Definition profiler.cpp:179
Provides interface to the OKS kernel.
Definition kernel.hpp:582
friend class OksFunctionProfiler
Definition profiler.hpp:85
friend std::ostream & operator<<(std::ostream &, const OksProfiler &)
Definition profiler.cpp:90
unsigned long c_total[(unsigned) OksProfiler::QueryOperatorFrom+1]
Definition profiler.hpp:82
std::chrono::time_point< std::chrono::steady_clock > p_start_time_point
Definition profiler.hpp:79
double t_total[(unsigned) OksProfiler::QueryOperatorFrom+1]
Definition profiler.hpp:81
const std::chrono::time_point< std::chrono::steady_clock > start_time_point() const
Definition profiler.hpp:65
void Start(OksProfiler::FunctionID, std::chrono::time_point< std::chrono::steady_clock > &)
Definition profiler.cpp:166
void Stop(OksProfiler::FunctionID, const std::chrono::time_point< std::chrono::steady_clock > &)
Definition profiler.cpp:173
Including Qt Headers.
Definition module.cpp:16