https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
14class PerfNode;
15class PerfGraph;
21{
22public:
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
47private:
51 std::size_t & _max_memory_this_rank;
53 std::vector<std::size_t> & _max_memory_per_rank;
54};
55
56void to_json(nlohmann::json & json, const PerfGraphReporter::PerfGraphJSON & perf_graph_json);
57
67void dataStore(std::ostream &, PerfGraphReporter::PerfGraphJSON &, void *);
68void dataLoad(std::istream &, PerfGraphReporter::PerfGraphJSON &, void *);
void dataStore(std::ostream &, PerfGraphReporter::PerfGraphJSON &, void *)
Store and load methods for const PerfGraph *, used in the PerfGraphReporter, which do nothing.
void to_json(nlohmann::json &json, const PerfGraphReporter::PerfGraphJSON &perf_graph_json)
void dataLoad(std::istream &, PerfGraphReporter::PerfGraphJSON &, void *)
Reporter object that has a single execution of the "execute" method for each execute flag.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
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...
std::size_t & _max_memory_this_rank
"_max_memory_this_proc" entry in the reporter; max memory for this rank
void execute() override
Execute method.
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 initialize() override
Called before execute() is ever called so that data can be cleared.
The PerfGraph will hold the master list of all registered performance segments and the head PerfNode.
Definition PerfGraph.h:44
A node in the PerfGraph.
Definition PerfNode.h:26
Structure that holds the PerfGraph in JSON.