Electroneum
perf_timer.cpp File Reference
#include <vector>
#include "misc_os_dependent.h"
#include "perf_timer.h"
Include dependency graph for perf_timer.cpp:

Go to the source code of this file.

Namespaces

 tools
 Various Tools.
 

Macros

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "perf"
 
#define PERF_LOG_ALWAYS(level, cat, x)   el::base::Writer(level, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::FileOnlyLog).construct(cat) << x
 
#define PERF_LOG(level, cat, x)
 

Functions

uint64_t tools::get_tick_count ()
 
uint64_t tools::ticks_to_ns (uint64_t ticks)
 
void tools::set_performance_timer_log_level (el::Level level)
 

Variables

el::Level tools::performance_timer_log_level = el::Level::Info
 

Macro Definition Documentation

◆ ELECTRONEUM_DEFAULT_LOG_CATEGORY

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "perf"

Definition at line 35 of file perf_timer.cpp.

◆ PERF_LOG

#define PERF_LOG (   level,
  cat,
 
)
Value:
do { \
if (ELPP->vRegistry()->allowed(level, cat)) PERF_LOG_ALWAYS(level, cat, x); \
} while(0)
#define ELPP
#define PERF_LOG_ALWAYS(level, cat, x)
Definition: perf_timer.cpp:37

Definition at line 39 of file perf_timer.cpp.

◆ PERF_LOG_ALWAYS

#define PERF_LOG_ALWAYS (   level,
  cat,
 
)    el::base::Writer(level, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::FileOnlyLog).construct(cat) << x

Definition at line 37 of file perf_timer.cpp.