Clingo
|
Base class for profiling data. More...
#include <profile.hh>
Public Types | |
using | Visitor = std::function< void(std::variant< std::pair< std::string_view, bool >, std::pair< ProfileStats const *, ProfileType > >, size_t)> |
The type of visitor function to use for visiting profile nodes. | |
Public Member Functions | |
ProfileNode ()=default | |
The default constructor. | |
ProfileNode (ProfileNode const &other)=delete | |
Delete the copy constructor. | |
auto | operator= (ProfileNode const &other) -> ProfileNode &=delete |
Delete assignment operator. | |
virtual | ~ProfileNode ()=default |
Destructor. | |
void | print (std::ostream &out, ProfileIndent indent, ProfileDetail detail, ProfileType type) const |
Print the profiling data to the given output stream. | |
auto | equal (ProfileNode const &node) const -> bool |
Compare this profile node with another for equality. | |
virtual auto | score (ProfileType type) const -> double |
Get a score for sorting profile nodes. | |
virtual void | begin_step () |
Reset the per step statistics. | |
virtual void | end_step () |
Accumulate the per step stats into the accumulated stats. | |
virtual void | combine (ProfileStats &stats, ProfileType type, bool nested) const |
Combine stats below this node. | |
void | accept (Visitor const &visit, size_t depth) const |
Visit the profile node with the given visitor function. | |
Base class for profiling data.
|
inline |
Print the profiling data to the given output stream.
The data is indented by the given amount. Nested profiling data is printed with increased indentation.