PhoenixHardware
0.2.0
Tools to get hardware information
Toggle main menu visibility
Loading...
Searching...
No Matches
PProfiler.h
Go to the documentation of this file.
1
/***************************************
2
Auteur : Pierre Aubert
3
Mail : pierre.aubert@lapp.in2p3.fr
4
Licence : CeCILL-C
5
****************************************/
6
7
#ifndef __PPROFILER_H__
8
#define __PPROFILER_H__
9
10
#include <vector>
11
#include "
PFunctionPerf.h
"
12
13
typedef
std::vector<PFunctionPerf>
PVecFunctionPerf
;
14
16
class
PProfiler
{
17
public
:
18
PProfiler
();
19
PProfiler
(
const
PProfiler
& other);
20
virtual
~PProfiler
();
21
PProfiler
&
operator =
(
const
PProfiler
& other);
22
23
size_t
addFunction
(
const
std::string & name,
size_t
nbThread = 1lu);
24
void
rename
(
size_t
index,
const
std::string & name);
25
void
start
(
size_t
index,
size_t
threadIndex = 0lu);
26
void
stop
(
size_t
index,
size_t
threadIndex = 0lu);
27
void
reset
(
size_t
index,
size_t
threadIndex = 0lu);
28
void
reset
();
29
30
void
print
(std::ostream & out = std::cout)
const
;
31
32
void
printCsvHeader
(std::ostream & out = std::cout)
const
;
33
void
printCsv
(std::ostream & out = std::cout)
const
;
34
35
protected
:
36
void
copyPProfiler
(
const
PProfiler
& other);
37
38
private
:
39
void
initialisationPProfiler
();
40
42
PVecFunctionPerf
p_vecFunctionPerf
;
43
};
44
45
46
47
#endif
48
PFunctionPerf.h
PVecFunctionPerf
std::vector< PFunctionPerf > PVecFunctionPerf
Definition
PProfiler.h:13
PProfiler::initialisationPProfiler
void initialisationPProfiler()
Initialisation function of the class PProfiler.
Definition
PProfiler.cpp:123
PProfiler::printCsvHeader
void printCsvHeader(std::ostream &out=std::cout) const
Print header of all the PFunctionPerf of the PProfiler in CSV format.
Definition
PProfiler.cpp:102
PProfiler::start
void start(size_t index, size_t threadIndex=0lu)
Start the given PFunctionPerf.
Definition
PProfiler.cpp:63
PProfiler::PProfiler
PProfiler()
Default constructor of PProfiler.
Definition
PProfiler.cpp:13
PProfiler::print
void print(std::ostream &out=std::cout) const
Print all the PFunctionPerf of the PProfiler.
Definition
PProfiler.cpp:93
PProfiler::printCsv
void printCsv(std::ostream &out=std::cout) const
Print all the PFunctionPerf of the PProfiler in CSV format.
Definition
PProfiler.cpp:109
PProfiler::copyPProfiler
void copyPProfiler(const PProfiler &other)
Copy function of PProfiler.
Definition
PProfiler.cpp:118
PProfiler::rename
void rename(size_t index, const std::string &name)
Rename a function.
Definition
PProfiler.cpp:55
PProfiler::operator=
PProfiler & operator=(const PProfiler &other)
Definition of equal operator of PProfiler.
Definition
PProfiler.cpp:33
PProfiler::~PProfiler
virtual ~PProfiler()
Destructor of PProfiler.
Definition
PProfiler.cpp:25
PProfiler::addFunction
size_t addFunction(const std::string &name, size_t nbThread=1lu)
Add a function to profile.
Definition
PProfiler.cpp:43
PProfiler::reset
void reset()
Reset all the function perf.
Definition
PProfiler.cpp:84
PProfiler::p_vecFunctionPerf
PVecFunctionPerf p_vecFunctionPerf
Vector of performances for all registered functions.
Definition
PProfiler.h:42
PProfiler::stop
void stop(size_t index, size_t threadIndex=0lu)
Stop the given PFunctionPerf.
Definition
PProfiler.cpp:71
src
PProfiler.h
Generated by
1.17.0