https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Classes | Functions
PerfGraph.h File Reference

Go to the source code of this file.

Classes

class  PerfGraph
 The PerfGraph will hold the master list of all registered performance segments and the head PerfNode. More...
 
struct  PerfGraph::CumulativeSectionInfo
 Use to hold the cumulative time and memory for each section, which comes from all of the PerfNodes that contribute to said section. More...
 
class  PerfGraph::SectionIncrement
 Use to hold an increment of time and memory for a section This is used in the LivePrint capability. More...
 

Functions

void dataStore (std::ostream &stream, PerfGraph &perf_graph, void *context)
 
void dataLoad (std::istream &stream, PerfGraph &perf_graph, void *context)
 

Function Documentation

◆ dataLoad()

void dataLoad ( std::istream &  stream,
PerfGraph perf_graph,
void *  context 
)

Definition at line 525 of file PerfGraph.C.

526{
527 // Load in all of the recovered sections and register those that do not exist yet
528 std::vector<moose::internal::PerfGraphSectionInfo> recovered_section_info;
529 dataLoad(stream, recovered_section_info, nullptr);
530 for (const auto & info : recovered_section_info)
531 {
532 if (info._live_message.size())
534 info._name, info._level, info._live_message, info._print_dots);
535 else
536 perf_graph._perf_graph_registry.registerSection(info._name, info._level);
537 }
538
539 // Update the current node time/memory/calls before loading the nodes as the load
540 // will append information to current nodes that exist
541 perf_graph.update();
542
543 // Recursively load all of the nodes; this will append information to matching nodes
544 // and will create new nodes for section paths that do not exist
545 dataLoad(stream, perf_graph._root_node, &perf_graph);
546}
void dataLoad(std::istream &stream, PerfGraph &perf_graph, void *)
Definition PerfGraph.C:525
PerfGraphRegistry & _perf_graph_registry
The PerfGraphRegistry.
Definition PerfGraph.h:344
void update()
Updates the time section_time and time for all currently running nodes.
Definition PerfGraph.C:285
const std::unique_ptr< PerfNode > _root_node
The root node of the graph.
Definition PerfGraph.h:356
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
MPI_Info info

◆ dataStore()

void dataStore ( std::ostream &  stream,
PerfGraph perf_graph,
void *  context 
)

Definition at line 511 of file PerfGraph.C.

512{
513 // We need to store the registry id -> section info map so that we can add
514 // registered sections that may not be added yet during recover
515 dataStore(stream, perf_graph._perf_graph_registry._id_to_item, nullptr);
516
517 // Update before serializing the nodes so that the time/memory/calls are correct
518 perf_graph.update();
519
520 // Recursively serialize all of the nodes
521 dataStore(stream, perf_graph._root_node, nullptr);
522}
void dataStore(std::ostream &stream, PerfGraph &perf_graph, void *)
Definition PerfGraph.C:511
std::deque< Item > _id_to_item
Vector of IDs to Items.