Clingo
|
A profile node that holds a printable expression and children. More...
#include <profile.hh>
Public Member Functions | |
ProfileNodeExpression (T expr, bool nested=false) | |
Construct the profile node with the given expression. | |
![]() | |
template<class T > | |
auto | add_child (std::unique_ptr< T > child) -> T & |
Add a child profile node. | |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
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. | |
A profile node that holds a printable expression and children.