17 "graph",
"max_memory_this_rank",
"max_memory_per_rank",
"version"};
30 _max_memory_this_rank(
32 _max_memory_per_rank(declareValueByName<
std::vector<
std::size_t>>(
59 std::function<void(nlohmann::json & json,
const PerfNode &)> recurse_node;
60 recurse_node = [&recurse_node](nlohmann::json & json,
const PerfNode & node)
64 auto & node_json = json[info._name];
65 node_json[
"level"] = info._level;
66 node_json[
"num_calls"] = node.numCalls();
67 node_json[
"time"] = node.selfTimeSec();
70 if (node.children().size())
72 auto & children = node_json[
"children"];
73 for (
const auto & id_child_pair : node.children())
74 recurse_node(children, *id_child_pair.second);
93 json = perf_graph_json.
value;
void dataStore(std::ostream &, PerfGraphReporter::PerfGraphJSON &, void *)
Store and load methods for const PerfGraph *, used in the PerfGraphReporter, which do nothing.
registerMooseObject("MooseApp", PerfGraphReporter)
void to_json(nlohmann::json &json, const PerfGraphReporter::PerfGraphJSON &perf_graph_json)
void dataLoad(std::istream &, PerfGraphReporter::PerfGraphJSON &, void *)
const ReporterMode REPORTER_MODE_DISTRIBUTED
const ReporterMode REPORTER_MODE_ROOT
Reporter object that has a single execution of the "execute" method for each execute flag.
static InputParameters validParams()
PerfGraph & perfGraph()
Get the PerfGraph.
Reports the full graph from the PerfGraph.
static InputParameters validParams()
static const std::vector< ReporterValueName > value_names
The reporter values that this object declares; used within the CommonOutputAction to single out value...
PerfGraphReporter(const InputParameters ¶meters)
std::size_t & _max_memory_this_rank
"_max_memory_this_proc" entry in the reporter; max memory for this rank
void finalize() override
Finalize.
PerfGraphJSON & _graph
"graph" entry in the reporter; the actual graph
std::vector< std::size_t > & _max_memory_per_rank
"max_memory_per_proc" entry in the reporter; max memory across all ranks
void gather(const unsigned int root_id, const T &send_data, std::vector< T, A > &recv) const
const Parallel::Communicator & comm() const
const PerfGraphSectionInfo & sectionInfo(const PerfID section_id) const
Given a PerfID return the PerfGraphSectionInfo @section_id The ID.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.
Structure that holds the PerfGraph in JSON.