15 std::chrono::steady_clock::duration
21 std::chrono::steady_clock::duration
29 std::chrono::steady_clock::duration
32 std::chrono::steady_clock::duration children_time(0);
35 children_time += child_it.second->totalTime();
49 long int children_memory = 0;
52 children_memory += child_it.second->totalMemory();
54 return children_memory;
58 dataStore(std::ostream & stream,
const std::unique_ptr<PerfNode> & node,
void *)
64 dataStore(stream, node->_total_time,
nullptr);
65 dataStore(stream, node->_num_calls,
nullptr);
66 dataStore(stream, node->_total_memory,
nullptr);
69 std::size_t num_children = node->children().size();
71 for (
auto & id_child_pair : node->_children)
73 const auto & child = id_child_pair.second;
79 dataLoad(std::istream & stream,
const std::unique_ptr<PerfNode> & node,
void * perf_graph)
84 if (node.get() == &
static_cast<PerfGraph *
>(perf_graph)->rootNode())
87 std::chrono::steady_clock::duration total_time;
88 dataLoad(stream, total_time,
nullptr);
89 node->_total_time += total_time;
91 long unsigned int num_calls;
92 dataLoad(stream, num_calls,
nullptr);
93 node->_num_calls += num_calls;
95 long unsigned int total_memory;
96 dataLoad(stream, total_memory,
nullptr);
97 node->_total_memory += total_memory;
102 std::size_t num_children;
103 dataLoad(stream, num_children,
nullptr);
105 while (i++ < num_children)
111 const auto & child = node->_children[id];
112 dataLoad(stream, child, perf_graph);
std::string name(const ElemQuality q)
long int selfMemory() const
Get the amount of memory added by this node.
long int childrenMemory() const
Get the amount of memory added by this node.
void dataLoad(std::istream &stream, const std::unique_ptr< PerfNode > &node, void *perf_graph)
std::chrono::steady_clock::duration childrenTime() const
Get the time this nodes children took.
std::chrono::steady_clock::duration _total_time
The total elapsed time for this node.
std::chrono::steady_clock::duration totalTime() const
The time this Node plus all of it's children took.
std::map< PerfID, std::unique_ptr< PerfNode > > _children
Timers that are directly underneath this node.
const PerfGraphSectionInfo & sectionInfo(const PerfID section_id) const
Given a PerfID return the PerfGraphSectionInfo The ID.
long unsigned int _total_memory
The total memory added while this node is active.
PerfID sectionID(const std::string §ion_name) const
Given a name return the PerfID The name of the section.
void dataStore(std::ostream &stream, const std::unique_ptr< PerfNode > &node, void *)
std::chrono::steady_clock::duration selfTime() const
Get the time this node took.
The PerfGraph will hold the master list of all registered performance segments and the head PerfNode...
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.