www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PerfGraphInterface Class Reference

Interface for objects that needs transient capabilities. More...

#include <PerfGraphInterface.h>

Inheritance diagram for PerfGraphInterface:
[legend]

Public Member Functions

 PerfGraphInterface (const MooseObject *moose_object)
 For objects that are MooseObjects with a default prefix of type() More...
 
 PerfGraphInterface (const MooseObject *moose_object, const std::string prefix)
 For objects that are MooseObjects. More...
 
 PerfGraphInterface (PerfGraph &perf_graph, const std::string prefix="")
 For objects that aren't MooseObjects. More...
 
virtual ~PerfGraphInterface ()=default
 

Protected Member Functions

PerfID registerTimedSection (const std::string &section_name, const unsigned int level)
 Call to register a named section for timing. More...
 

Protected Attributes

const InputParameters_pg_params
 Params. More...
 
PerfGraph_perf_graph
 The performance graph to add to. More...
 
std::string _prefix
 A prefix to use for all sections. More...
 

Detailed Description

Interface for objects that needs transient capabilities.

Definition at line 32 of file PerfGraphInterface.h.

Constructor & Destructor Documentation

◆ PerfGraphInterface() [1/3]

PerfGraphInterface::PerfGraphInterface ( const MooseObject moose_object)

For objects that are MooseObjects with a default prefix of type()

Definition at line 22 of file PerfGraphInterface.C.

23  : _pg_params(&moose_object->parameters()),
26  ->getCheckedPointerParam<MooseApp *>(
27  "_moose_app", "PerfGraphInterface is unable to retrieve the MooseApp pointer!")
28  ->perfGraph()),
29  _prefix(moose_object->type())
30 {
31 }
PerfGraph & _perf_graph
The performance graph to add to.
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
std::string _prefix
A prefix to use for all sections.
const InputParameters * _pg_params
Params.

◆ PerfGraphInterface() [2/3]

PerfGraphInterface::PerfGraphInterface ( const MooseObject moose_object,
const std::string  prefix 
)

For objects that are MooseObjects.

Definition at line 33 of file PerfGraphInterface.C.

34  : _pg_params(&moose_object->parameters()),
37  ->getCheckedPointerParam<MooseApp *>(
38  "_moose_app", "PerfGraphInterface is unable to retrieve the MooseApp pointer!")
39  ->perfGraph()),
40  _prefix(prefix)
41 {
42 }
PerfGraph & _perf_graph
The performance graph to add to.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
std::string _prefix
A prefix to use for all sections.
const InputParameters * _pg_params
Params.

◆ PerfGraphInterface() [3/3]

PerfGraphInterface::PerfGraphInterface ( PerfGraph perf_graph,
const std::string  prefix = "" 
)

For objects that aren't MooseObjects.

Definition at line 44 of file PerfGraphInterface.C.

45  : _perf_graph(perf_graph), _prefix(prefix)
46 {
47 }
PerfGraph & _perf_graph
The performance graph to add to.
std::string _prefix
A prefix to use for all sections.

◆ ~PerfGraphInterface()

virtual PerfGraphInterface::~PerfGraphInterface ( )
virtualdefault

Member Function Documentation

◆ registerTimedSection()

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
)
protected

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 50 of file PerfGraphInterface.C.

51 {
52  if (_prefix != "")
53  return _perf_graph.registerSection(_prefix + "::" + section_name, level);
54  else
55  return _perf_graph.registerSection(section_name, level);
56 }
PerfGraph & _perf_graph
The performance graph to add to.
std::string _prefix
A prefix to use for all sections.
PerfID registerSection(const std::string &section_name, unsigned int level)
Registers a named section of code.
Definition: PerfGraph.C:41

Member Data Documentation

◆ _perf_graph

PerfGraph& PerfGraphInterface::_perf_graph
protected

The performance graph to add to.

Definition at line 66 of file PerfGraphInterface.h.

Referenced by PerfGraphData::getValue(), and registerTimedSection().

◆ _pg_params

const InputParameters* PerfGraphInterface::_pg_params
protected

Params.

Definition at line 63 of file PerfGraphInterface.h.

◆ _prefix

std::string PerfGraphInterface::_prefix
protected

A prefix to use for all sections.

Definition at line 69 of file PerfGraphInterface.h.

Referenced by registerTimedSection().


The documentation for this class was generated from the following files: