OmniSciDB  29e35f4d58
logger::DurationTree Class Reference

Public Member Functions

 DurationTree (std::thread::id thread_id, int start_depth)
 
void pushDurationTree (DurationTree &duration_tree)
 
const DurationbaseDuration () const
 
int currentDepth () const
 
void decrementDepth ()
 
std::deque< DurationTreeNode > const & durations () const
 
template<typename... Ts>
DurationnewDuration (Ts &&... args)
 

Public Attributes

int const depth_
 
std::thread::id const thread_id_
 

Private Attributes

std::deque< DurationTreeNodedurations_
 
int current_depth_
 

Detailed Description

Definition at line 442 of file Logger.cpp.

Constructor & Destructor Documentation

◆ DurationTree()

logger::DurationTree::DurationTree ( std::thread::id  thread_id,
int  start_depth 
)
inline

Definition at line 449 of file Logger.cpp.

451  : current_depth_(start_depth + (start_depth == 0 ? 0 : 1))
452  , depth_(start_depth)
453  , thread_id_(thread_id) {}
std::thread::id const thread_id_
Definition: Logger.cpp:448
int const depth_
Definition: Logger.cpp:447

Member Function Documentation

◆ baseDuration()

const Duration& logger::DurationTree::baseDuration ( ) const
inline

Definition at line 457 of file Logger.cpp.

References CHECK.

457  {
458  CHECK(!durations_.empty());
459  return boost::get<Duration>(durations_.front());
460  }
std::deque< DurationTreeNode > durations_
Definition: Logger.cpp:443
#define CHECK(condition)
Definition: Logger.h:193

◆ currentDepth()

int logger::DurationTree::currentDepth ( ) const
inline

Definition at line 461 of file Logger.cpp.

461 { return current_depth_; }

◆ decrementDepth()

void logger::DurationTree::decrementDepth ( )
inline

Definition at line 462 of file Logger.cpp.

462 { --current_depth_; }

◆ durations()

std::deque<DurationTreeNode> const& logger::DurationTree::durations ( ) const
inline

Definition at line 463 of file Logger.cpp.

Referenced by logger::EraseDurationTrees::operator()(), and logger::operator<<().

463 { return durations_; }
std::deque< DurationTreeNode > durations_
Definition: Logger.cpp:443
+ Here is the caller graph for this function:

◆ newDuration()

template<typename... Ts>
Duration* logger::DurationTree::newDuration ( Ts &&...  args)
inline

Definition at line 465 of file Logger.cpp.

References run_benchmark_import::args.

465  {
466  durations_.emplace_back(Duration(this, current_depth_++, std::forward<Ts>(args)...));
467  return boost::get<Duration>(&durations_.back());
468  }
std::deque< DurationTreeNode > durations_
Definition: Logger.cpp:443

◆ pushDurationTree()

void logger::DurationTree::pushDurationTree ( DurationTree duration_tree)
inline

Definition at line 454 of file Logger.cpp.

454  {
455  durations_.emplace_back(duration_tree);
456  }
std::deque< DurationTreeNode > durations_
Definition: Logger.cpp:443

Member Data Documentation

◆ current_depth_

int logger::DurationTree::current_depth_
private

Definition at line 444 of file Logger.cpp.

◆ depth_

int const logger::DurationTree::depth_

Definition at line 447 of file Logger.cpp.

Referenced by logger::operator<<().

◆ durations_

std::deque<DurationTreeNode> logger::DurationTree::durations_
private

Definition at line 443 of file Logger.cpp.

◆ thread_id_

std::thread::id const logger::DurationTree::thread_id_

Definition at line 448 of file Logger.cpp.

Referenced by logger::EraseDurationTrees::operator()(), and logger::operator<<().


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