www.mooseframework.org
Functions
PerfGraph.C File Reference

Go to the source code of this file.

Functions

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

Function Documentation

◆ dataLoad()

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

Definition at line 500 of file PerfGraph.C.

501 {
502  // Load in all of the recovered sections and register those that do not exist yet
503  std::vector<moose::internal::PerfGraphSectionInfo> recovered_section_info;
504  dataLoad(stream, recovered_section_info, nullptr);
505  for (const auto & info : recovered_section_info)
506  {
507  if (info._live_message.size())
509  info._name, info._level, info._live_message, info._print_dots);
510  else
511  perf_graph._perf_graph_registry.registerSection(info._name, info._level);
512  }
513 
514  // Update the current node time/memory/calls before loading the nodes as the load
515  // will append information to current nodes that exist
516  perf_graph.update();
517 
518  // Recursively load all of the nodes; this will append information to matching nodes
519  // and will create new nodes for section paths that do not exist
520  dataLoad(stream, perf_graph._root_node, &perf_graph);
521 }
PerfGraphRegistry & _perf_graph_registry
The PerfGraphRegistry.
Definition: PerfGraph.h:340
MPI_Info info
void update()
Updates the time section_time and time for all currently running nodes.
Definition: PerfGraph.C:271
const std::unique_ptr< PerfNode > _root_node
The root node of the graph.
Definition: PerfGraph.h:352
void dataLoad(std::istream &stream, PerfGraph &perf_graph, void *)
Definition: PerfGraph.C:500
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  
)

Definition at line 486 of file PerfGraph.C.

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