OmniSciDB  c1a53651b2
 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 391 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 822 of file Logger.cpp.

References parse_ast::line.

823  : duration_(newDuration({severity, file, line, name})) {
Duration * duration_
Definition: Logger.h:392
tuple line
Definition: parse_ast.py:10
Duration * newDuration(DebugTimerParams const debug_timer_params)
Definition: Logger.cpp:653
string name
Definition: setup.in.py:72
logger::DebugTimer::~DebugTimer ( )
Initial value:
{
void omnisci_range_push(Category c, const char *name, const char *file)
string name
Definition: setup.in.py:72

Definition at line 827 of file Logger.cpp.

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

827  {
828  stop();
830 }
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 832 of file Logger.cpp.

References duration_, and logger::logAndEraseDurationTree().

Referenced by ~DebugTimer().

832  {
833  if (duration_) {
834  if (duration_->stop()) {
835  logAndEraseDurationTree(nullptr);
836  }
837  duration_ = nullptr;
838  }
839 }
Duration * duration_
Definition: Logger.h:392
void logAndEraseDurationTree(std::string *json_str)
Definition: Logger.cpp:805

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 841 of file Logger.cpp.

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

841  {
842  std::string json_str;
843  if (duration_) {
844  if (duration_->stop()) {
845  logAndEraseDurationTree(&json_str);
846  }
847  duration_ = nullptr;
848  }
849  return json_str;
850 }
const std::string json_str(const rapidjson::Value &obj) noexcept
Definition: JsonAccessors.h:44
Duration * duration_
Definition: Logger.h:392
void logAndEraseDurationTree(std::string *json_str)
Definition: Logger.cpp:805

+ Here is the call graph for this function:

Member Data Documentation

Duration* logger::DebugTimer::duration_
private

Definition at line 392 of file Logger.h.

Referenced by stop(), and stopAndGetJson().


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