OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 72 of file measure.h.

Constructor & Destructor Documentation

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

Definition at line 73 of file measure.h.

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

74  : description_(description), lineNum_(lineNum), func_(func) {
76  start_ = timer_start();
77  LOG(INFO) << "Timer start " << std::setfill(' ') << std::setw(35) << description_
78  << " " << std::setw(35) << func_ << ":" << std::setw(5) << lineNum_;
79  }
80  }
std::chrono::steady_clock::time_point start_
Definition: measure.h:94
#define LOG(tag)
Definition: Logger.h:285
bool g_enable_debug_timer
Definition: Logger.cpp:17
int lineNum_
Definition: measure.h:91
std::string func_
Definition: measure.h:92
std::string description_
Definition: measure.h:90
Type timer_start()
Definition: measure.h:42

+ Here is the call graph for this function:

InjectTimer::~InjectTimer ( )
inline

Definition at line 82 of file measure.h.

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

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

+ Here is the call graph for this function:

Member Data Documentation

std::string InjectTimer::description_

Definition at line 90 of file measure.h.

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

std::string InjectTimer::func_

Definition at line 92 of file measure.h.

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

int InjectTimer::lineNum_

Definition at line 91 of file measure.h.

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

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

Definition at line 94 of file measure.h.

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


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