42 const long int memory)
52 const std::chrono::time_point<std::chrono::steady_clock> &
startTime()
const
67 const long int memory)
99 child_node = std::make_unique<PerfNode>(
id);
101 return child_node.get();
112 std::chrono::steady_clock::duration
selfTime()
const;
125 std::chrono::steady_clock::duration
totalTime()
const;
138 std::chrono::steady_clock::duration
childrenTime()
const;
186 friend void dataStore(std::ostream &,
const std::unique_ptr<PerfNode> &,
void *);
187 friend void dataLoad(std::istream &,
const std::unique_ptr<PerfNode> &,
void *);
190void dataStore(std::ostream & stream,
const std::unique_ptr<PerfNode> & node,
void * context);
191void dataLoad(std::istream & stream,
const std::unique_ptr<PerfNode> & node,
void * context);
void dataStore(std::ostream &stream, const std::unique_ptr< PerfNode > &node, void *context)
void dataLoad(std::istream &stream, const std::unique_ptr< PerfNode > &node, void *context)
Real totalTimeAvg() const
The average time this Node plus all of its children took in seconds.
std::chrono::steady_clock::duration totalTime() const
The time this Node plus all of it's children took.
Real childrenTimeSec() const
The time this node's children took in seconds.
PerfNode * getChild(const PerfID id)
Get a child node with the unique id given.
friend void dataLoad(std::istream &, const std::unique_ptr< PerfNode > &, void *)
Real selfTimeSec() const
Get the time this node took in seconds.
void incrementNumCalls()
Increments the number of calls.
const long unsigned int & startMemory() const
Get the current start memory Only makes sense if this node is running.
PerfNode(const PerfID id)
Create a PerfNode with the given ID.
friend void dataStore(std::ostream &, const std::unique_ptr< PerfNode > &, void *)
const PerfID _id
The unique ID for the section this Node corresponds to.
long int totalMemory() const
Get the amount of memory added by this node.
std::chrono::steady_clock::duration childrenTime() const
Get the time this nodes children took.
long int selfMemory() const
Get the amount of memory added by this node.
long unsigned int _start_memory
The starting memory for this node.
void setStartTimeAndMemory(const std::chrono::time_point< std::chrono::steady_clock > time, const long int memory)
Set the current start time.
void addTimeAndMemory(const std::chrono::time_point< std::chrono::steady_clock > time, const long int memory)
Add some time into this Node by taking the difference with the time passed in.
std::chrono::time_point< std::chrono::steady_clock > _start_time
The current start_time for this node (if it's on the stack)
const std::map< PerfID, std::unique_ptr< PerfNode > > & children() const
Get the children.
long int childrenMemory() const
Get the amount of memory added by this node.
Real totalTimeSec() const
The time this Node plus all of its children took in seconds.
PerfID id() const
Get the ID of this Node.
void addTimeAndMemory(const std::chrono::steady_clock::duration time)
Add some time into this Node.
Real selfTimeAvg() const
The average time this node took in seconds.
std::map< PerfID, std::unique_ptr< PerfNode > > _children
Timers that are directly underneath this node.
const std::chrono::time_point< std::chrono::steady_clock > & startTime() const
Get the currnet start time Only makes sense if this node is running.
long unsigned int _num_calls
Number of times this node has been called.
long unsigned int _total_memory
The total memory added while this node is active.
std::chrono::steady_clock::duration _total_time
The total elapsed time for this node.
unsigned long int numCalls() const
Get the number of times this node was called.
std::chrono::steady_clock::duration selfTime() const
Get the time this node took.