https://mooseframework.inl.gov
Classes | Functions
PerfGraph.h File Reference

Go to the source code of this file.

Classes

class  VariadicTable< Ts >
 A class for "pretty printing" a table of data. More...
 
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 504 of file PerfGraph.C.

505 {
506  // Load in all of the recovered sections and register those that do not exist yet
507  std::vector<moose::internal::PerfGraphSectionInfo> recovered_section_info;
508  dataLoad(stream, recovered_section_info, nullptr);
509  for (const auto & info : recovered_section_info)
510  {
511  if (info._live_message.size())
513  info._name, info._level, info._live_message, info._print_dots);
514  else
515  perf_graph._perf_graph_registry.registerSection(info._name, info._level);
516  }
517 
518  // Update the current node time/memory/calls before loading the nodes as the load
519  // will append information to current nodes that exist
520  perf_graph.update();
521 
522  // Recursively load all of the nodes; this will append information to matching nodes
523  // and will create new nodes for section paths that do not exist
524  dataLoad(stream, perf_graph._root_node, &perf_graph);
525 }
PerfGraphRegistry & _perf_graph_registry
The PerfGraphRegistry.
Definition: PerfGraph.h:337
MPI_Info info
void update()
Updates the time section_time and time for all currently running nodes.
Definition: PerfGraph.C:275
const std::unique_ptr< PerfNode > _root_node
The root node of the graph.
Definition: PerfGraph.h:349
void dataLoad(std::istream &stream, PerfGraph &perf_graph, void *)
Definition: PerfGraph.C:504
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.

◆ dataStore()

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

Definition at line 490 of file PerfGraph.C.

491 {
492  // We need to store the registry id -> section info map so that we can add
493  // registered sections that may not be added yet during recover
494  dataStore(stream, perf_graph._perf_graph_registry._id_to_item, nullptr);
495 
496  // Update before serializing the nodes so that the time/memory/calls are correct
497  perf_graph.update();
498 
499  // Recursively serialize all of the nodes
500  dataStore(stream, perf_graph._root_node, nullptr);
501 }
PerfGraphRegistry & _perf_graph_registry
The PerfGraphRegistry.
Definition: PerfGraph.h:337
void update()
Updates the time section_time and time for all currently running nodes.
Definition: PerfGraph.C:275
const std::unique_ptr< PerfNode > _root_node
The root node of the graph.
Definition: PerfGraph.h:349
std::deque< Item > _id_to_item
Vector of IDs to Items.
void dataStore(std::ostream &stream, PerfGraph &perf_graph, void *)
Definition: PerfGraph.C:490