OmniSciDB  fe05a0c208
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 Attributes

Durationduration_
 

Detailed Description

Definition at line 301 of file Logger.h.

Constructor & Destructor Documentation

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

Definition at line 692 of file Logger.cpp.

693  : duration_(newDuration(severity, file, line, name)) {}
string name
Definition: setup.in.py:72
Duration * duration_
Definition: Logger.h:302
Duration * newDuration(Severity severity, Ts &&...args)
Definition: Logger.cpp:531
logger::DebugTimer::~DebugTimer ( )

Definition at line 695 of file Logger.cpp.

References stop().

695  {
696  stop();
697 }

+ Here is the call graph for this function:

Member Function Documentation

void logger::DebugTimer::stop ( )

Definition at line 699 of file Logger.cpp.

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

Referenced by ~DebugTimer().

699  {
700  if (duration_) {
701  if (duration_->stop()) {
702  logAndEraseDurationTree(nullptr);
703  }
704  duration_ = nullptr;
705  }
706 }
Duration * duration_
Definition: Logger.h:302
void logAndEraseDurationTree(std::string *json_str)
Definition: Logger.cpp:676

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 708 of file Logger.cpp.

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

708  {
709  std::string json_str;
710  if (duration_) {
711  if (duration_->stop()) {
712  logAndEraseDurationTree(&json_str);
713  }
714  duration_ = nullptr;
715  }
716  return json_str;
717 }
const std::string json_str(const rapidjson::Value &obj) noexcept
Definition: JsonAccessors.h:44
Duration * duration_
Definition: Logger.h:302
void logAndEraseDurationTree(std::string *json_str)
Definition: Logger.cpp:676

+ Here is the call graph for this function:

Member Data Documentation

Duration* logger::DebugTimer::duration_
private

Definition at line 302 of file Logger.h.

Referenced by stop(), and stopAndGetJson().


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