OmniSciDB  6686921089
 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 Attributes

Durationduration_
 

Detailed Description

Definition at line 307 of file Logger.h.

Constructor & Destructor Documentation

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

Definition at line 744 of file Logger.cpp.

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

745  : duration_(newDuration(severity, file, line, name)) {
747 }
string name
Definition: setup.in.py:72
Duration * duration_
Definition: Logger.h:308
Duration * newDuration(Severity severity, Ts &&...args)
Definition: Logger.cpp:583
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 749 of file Logger.cpp.

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

749  {
750  stop();
752 }
void omnisci_range_pop()

+ Here is the call graph for this function:

Member Function Documentation

void logger::DebugTimer::stop ( )

Definition at line 754 of file Logger.cpp.

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

Referenced by ~DebugTimer().

754  {
755  if (duration_) {
756  if (duration_->stop()) {
757  logAndEraseDurationTree(nullptr);
758  }
759  duration_ = nullptr;
760  }
761 }
Duration * duration_
Definition: Logger.h:308
void logAndEraseDurationTree(std::string *json_str)
Definition: Logger.cpp:728

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 763 of file Logger.cpp.

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

763  {
764  std::string json_str;
765  if (duration_) {
766  if (duration_->stop()) {
767  logAndEraseDurationTree(&json_str);
768  }
769  duration_ = nullptr;
770  }
771  return json_str;
772 }
const std::string json_str(const rapidjson::Value &obj) noexcept
Definition: JsonAccessors.h:44
Duration * duration_
Definition: Logger.h:308
void logAndEraseDurationTree(std::string *json_str)
Definition: Logger.cpp:728

+ Here is the call graph for this function:

Member Data Documentation

Duration* logger::DebugTimer::duration_
private

Definition at line 308 of file Logger.h.

Referenced by stop(), and stopAndGetJson().


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