OmniSciDB  16c4e035a1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
logger::DebugTimer Class Reference

#include <Logger.h>

+ Collaboration diagram for logger::DebugTimer:

Public Member Functions

 DebugTimer (Severity, char const *file, int line, char const *name)
 
 ~DebugTimer ()
 
void stop ()
 
std::string stopAndGetJson ()
 

Private Member Functions

 DebugTimer (DebugTimer const &)=delete
 
 DebugTimer (DebugTimer &&)=delete
 
DebugTimeroperator= (DebugTimer const &)=delete
 
DebugTimeroperator= (DebugTimer &&)=delete
 

Private Attributes

Durationduration_
 

Detailed Description

Definition at line 309 of file Logger.h.

Constructor & Destructor Documentation

logger::DebugTimer::DebugTimer ( DebugTimer const )
privatedelete
logger::DebugTimer::DebugTimer ( DebugTimer &&  )
privatedelete
logger::DebugTimer::DebugTimer ( Severity  severity,
char const file,
int  line,
char const name 
)

Definition at line 759 of file Logger.cpp.

References nvtx_helpers::kDebugTimer, and nvtx_helpers::omnisci_range_push().

760  : duration_(newDuration(severity, file, line, name)) {
762 }
string name
Definition: setup.in.py:72
Duration * duration_
Definition: Logger.h:310
Duration * newDuration(Severity severity, Ts &&...args)
Definition: Logger.cpp:598
void omnisci_range_push(Category c, const char *name, const char *file)
tuple line
Definition: parse_ast.py:10

+ Here is the call graph for this function:

logger::DebugTimer::~DebugTimer ( )

Definition at line 764 of file Logger.cpp.

References nvtx_helpers::omnisci_range_pop(), and stop().

764  {
765  stop();
767 }
void omnisci_range_pop()

+ Here is the call graph for this function:

Member Function Documentation

DebugTimer& logger::DebugTimer::operator= ( DebugTimer const )
privatedelete
DebugTimer& logger::DebugTimer::operator= ( DebugTimer &&  )
privatedelete
void logger::DebugTimer::stop ( )

Definition at line 769 of file Logger.cpp.

References duration_, logger::logAndEraseDurationTree(), and logger::Duration::stop().

Referenced by ~DebugTimer().

769  {
770  if (duration_) {
771  if (duration_->stop()) {
772  logAndEraseDurationTree(nullptr);
773  }
774  duration_ = nullptr;
775  }
776 }
Duration * duration_
Definition: Logger.h:310
void logAndEraseDurationTree(std::string *json_str)
Definition: Logger.cpp:743

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string logger::DebugTimer::stopAndGetJson ( )

Definition at line 778 of file Logger.cpp.

References duration_, json_str(), logger::logAndEraseDurationTree(), and logger::Duration::stop().

778  {
779  std::string json_str;
780  if (duration_) {
781  if (duration_->stop()) {
782  logAndEraseDurationTree(&json_str);
783  }
784  duration_ = nullptr;
785  }
786  return json_str;
787 }
const std::string json_str(const rapidjson::Value &obj) noexcept
Definition: JsonAccessors.h:44
Duration * duration_
Definition: Logger.h:310
void logAndEraseDurationTree(std::string *json_str)
Definition: Logger.cpp:743

+ Here is the call graph for this function:

Member Data Documentation

Duration* logger::DebugTimer::duration_
private

Definition at line 310 of file Logger.h.

Referenced by stop(), and stopAndGetJson().


The documentation for this class was generated from the following files: