27class PerfGraphRegistry;
28class PerfGraphSectionInfo;
48 const std::string & name,
49 const unsigned int level,
50 const std::string & live_message,
51 const bool print_dots)
102 const unsigned int level,
103 const std::string & live_message,
104 const bool print_dots =
true);
120 return item(section_id);
149 const unsigned int level,
150 const std::string & live_message,
151 const bool print_dots =
true);
175 friend void ::dataStore(std::ostream &,
PerfGraph &,
void *);
void dataLoad(std::istream &stream, moose::internal::PerfGraphSectionInfo &info, void *context)
void dataStore(std::ostream &, PerfGraph &, void *)
const PerfGraphSectionInfo & itemNonLocking(const std::size_t id) const
bool keyExists(const std::string &key) const
std::size_t id(const std::string &key) const
const PerfGraphSectionInfo & item(const std::size_t id) const
bool idExists(const std::size_t id) const
This is effectively a functor that runs on a separate thread and watches the state of the call stack ...
The PerfGraph will hold the master list of all registered performance segments and the head PerfNode.
The place where all timed sections will be stored.
const PerfGraphSectionInfo & readSectionInfo(PerfID section_id) const
Special accessor just for PerfGraph so that no locking is needed in PerfGraph.
friend PerfGraph
This is only here so that PerfGraph can access readSectionInfo.
PerfID sectionID(const std::string §ion_name) const
Given a name return the PerfID @section_name The name of the section.
friend PerfGraphRegistry & getPerfGraphRegistry()
So it can be constructed.
PerfID registerSection(const std::string §ion_name, const unsigned int level)
Call to register a named section for timing.
bool sectionExists(const PerfID section_id) const
Whether or not a section with that id has been registered @section_id The ID.
PerfID actuallyRegisterSection(const std::string §ion_name, const unsigned int level, const std::string &live_message, const bool print_dots=true)
The internal function that actually carries out the registration.
std::size_t numSections() const
const PerfGraphSectionInfo & sectionInfo(const PerfID section_id) const
Given a PerfID return the PerfGraphSectionInfo @section_id The ID.
bool sectionExists(const std::string §ion_name) const
Whether or not a section with that name has been registered @section_name The name of the section.
Used to hold metadata about the registered sections Note: this is a class instead of a struct because...
unsigned int _level
Print level (verbosity level)
std::string _live_message
Message to print while the section is running.
PerfGraphSectionInfo()=default
std::string _name
The name.
bool _print_dots
Whether or not to print dots while this section runs.
PerfGraphSectionInfo(const PerfID id, const std::string &name, const unsigned int level, const std::string &live_message, const bool print_dots)
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.