OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InjectTimer Struct Reference

#include <measure.h>

+ Collaboration diagram for InjectTimer:

Public Member Functions

 InjectTimer (std::string const &description, int const &lineNum, std::string const &func)
 
 ~InjectTimer ()
 

Public Attributes

std::string description_
 
int lineNum_
 
std::string func_
 
std::chrono::steady_clock::time_point start_
 

Detailed Description

Definition at line 67 of file measure.h.

Constructor & Destructor Documentation

InjectTimer::InjectTimer ( std::string const &  description,
int const &  lineNum,
std::string const &  func 
)
inline

Definition at line 68 of file measure.h.

References description_, func_, g_enable_debug_timer, logger::INFO, lineNum_, LOG, start_, and timer_start().

69  : description_(description), lineNum_(lineNum), func_(func) {
71  start_ = timer_start();
72  LOG(INFO) << "Timer start " << std::setfill(' ') << std::setw(35) << description_
73  << " " << std::setw(35) << func_ << ":" << std::setw(5) << lineNum_;
74  }
75  }
std::chrono::steady_clock::time_point start_
Definition: measure.h:89
#define LOG(tag)
Definition: Logger.h:185
bool g_enable_debug_timer
Definition: Logger.cpp:17
int lineNum_
Definition: measure.h:86
std::string func_
Definition: measure.h:87
std::string description_
Definition: measure.h:85
Type timer_start()
Definition: measure.h:40

+ Here is the call graph for this function:

InjectTimer::~InjectTimer ( )
inline

Definition at line 77 of file measure.h.

References description_, func_, g_enable_debug_timer, logger::INFO, lineNum_, LOG, start_, and timer_stop().

77  {
79  LOG(INFO) << "Timer end " << std::setfill(' ') << std::setw(35) << description_
80  << " " << std::setw(35) << func_ << ":" << std::setw(5) << lineNum_
81  << " elapsed " << timer_stop(start_) << " ms";
82  }
83  }
std::chrono::steady_clock::time_point start_
Definition: measure.h:89
#define LOG(tag)
Definition: Logger.h:185
bool g_enable_debug_timer
Definition: Logger.cpp:17
int lineNum_
Definition: measure.h:86
TypeR::rep timer_stop(Type clock_begin)
Definition: measure.h:46
std::string func_
Definition: measure.h:87
std::string description_
Definition: measure.h:85

+ Here is the call graph for this function:

Member Data Documentation

std::string InjectTimer::description_

Definition at line 85 of file measure.h.

Referenced by InjectTimer(), and ~InjectTimer().

std::string InjectTimer::func_

Definition at line 87 of file measure.h.

Referenced by InjectTimer(), and ~InjectTimer().

int InjectTimer::lineNum_

Definition at line 86 of file measure.h.

Referenced by InjectTimer(), and ~InjectTimer().

std::chrono::steady_clock::time_point InjectTimer::start_

Definition at line 89 of file measure.h.

Referenced by InjectTimer(), and ~InjectTimer().


The documentation for this struct was generated from the following file: