Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
benchmark Namespace Reference

Classes

class  chronometrable
 

Functions

void chrono_set (chronometrable &chr)
 
void chrono_reset (chronometrable &chr)
 
void chrono_swap (chronometrable &input, chronometrable &output)
 
template<typename Frame >
void chrono_dump (const Frame &frame)
 

Detailed Description

Author
cpellegrino

Function Documentation

◆ chrono_set()

void benchmark::chrono_set ( chronometrable & chr)
inline

Definition at line 39 of file time_tracking.hh.

40{
41 #ifdef BENCH_TIME
42 chr.m_ch.set();
43 #endif // BENCH_TIME
44}

◆ chrono_reset()

void benchmark::chrono_reset ( chronometrable & chr)
inline

Definition at line 47 of file time_tracking.hh.

48{
49 #ifdef BENCH_TIME
50 chr.m_ch.reset();
51 chr.m_ch.set();
52 #endif // BENCH_TIME
53}

◆ chrono_swap()

void benchmark::chrono_swap ( chronometrable & input,
chronometrable & output )
inline

Definition at line 56 of file time_tracking.hh.

57{
58 #ifdef BENCH_TIME
59 output.m_ch.swap(input.m_ch);
60 #endif // BENCH_TIME
61}

◆ chrono_dump()

template<typename Frame >
void benchmark::chrono_dump ( const Frame & frame)
inline

Definition at line 65 of file time_tracking.hh.

66{
67 #ifdef BENCH_TIME
68 if (frame.getHeader()->DataType == ttdc)
69 {
70 static std::ofstream g_perf_file("/dev/shm/opto_dq_perf_measure.txt", std::ios_base::app);
71 g_perf_file << frame.m_ch << '\n';
72 }
73 if (frame.getHeader()->DataType == taes)
74 {
75 static std::ofstream g_perf_file("/dev/shm/acou_dq_perf_measure.txt", std::ios_base::app);
76 g_perf_file << frame.m_ch << '\n';
77 }
78 #endif // BENCH_TIME
79}
const DAQCommonHeader *const getHeader() const
Definition frame.hh:18
static const unsigned int taes
static const unsigned int ttdc