OmniSciDB  467d548b97
 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 69 of file measure.h.

Constructor & Destructor Documentation

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

Definition at line 70 of file measure.h.

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

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

+ Here is the call graph for this function:

InjectTimer::~InjectTimer ( )
inline

Definition at line 79 of file measure.h.

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

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

+ Here is the call graph for this function:

Member Data Documentation

std::string InjectTimer::description_

Definition at line 87 of file measure.h.

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

std::string InjectTimer::func_

Definition at line 89 of file measure.h.

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

int InjectTimer::lineNum_

Definition at line 88 of file measure.h.

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

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

Definition at line 91 of file measure.h.

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


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