https://mooseframework.inl.gov
PerfGraphReporter.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "GeneralReporter.h"
13 
14 class PerfNode;
15 class PerfGraph;
16 
21 {
22 public:
24 
26 
27  void initialize() override {}
28  void finalize() override;
29  void execute() override {}
30 
33  static const std::vector<ReporterValueName> value_names;
34 
43  {
44  nlohmann::json value;
45  };
46 
47 private:
51  std::size_t & _max_memory_this_rank;
53  std::vector<std::size_t> & _max_memory_per_rank;
54 };
55 
56 void to_json(nlohmann::json & json, const PerfGraphReporter::PerfGraphJSON & perf_graph_json);
57 
66 void dataStore(std::ostream &, PerfGraphReporter::PerfGraphJSON &, void *);
68 void dataLoad(std::istream &, PerfGraphReporter::PerfGraphJSON &, void *);
static const std::vector< ReporterValueName > value_names
The reporter values that this object declares; used within the CommonOutputAction to single out value...
static InputParameters validParams()
std::vector< std::size_t > & _max_memory_per_rank
"max_memory_per_proc" entry in the reporter; max memory across all ranks
void initialize() override
Called before execute() is ever called so that data can be cleared.
Reporter object that has a single execution of the "execute" method for each execute flag...
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::size_t & _max_memory_this_rank
"_max_memory_this_proc" entry in the reporter; max memory for this rank
Reports the full graph from the PerfGraph.
void execute() override
Execute method.
void to_json(nlohmann::json &json, const PerfGraphReporter::PerfGraphJSON &perf_graph_json)
void dataLoad(std::istream &, PerfGraphReporter::PerfGraphJSON &, void *)
PerfGraphJSON & _graph
"graph" entry in the reporter; the actual graph
void finalize() override
Finalize.
void dataStore(std::ostream &, PerfGraphReporter::PerfGraphJSON &, void *)
Store and load methods for const PerfGraph *, used in the PerfGraphReporter, which do nothing...
PerfGraphReporter(const InputParameters &parameters)
Structure that holds the PerfGraph in JSON.
The PerfGraph will hold the master list of all registered performance segments and the head PerfNode...
Definition: PerfGraph.h:43
A node in the PerfGraph.
Definition: PerfNode.h:25