Clingo
Loading...
Searching...
No Matches
CppClingo::Control::ProfileProgram Class Reference

Class storing profiling data for a program. More...

#include <context.hh>

Public Member Functions

auto add (Input::Stm const &stm) -> Ground::ProfileNodeInternal &
 Add a profiling node for a statement.
 
void print (std::ostream &out, Ground::ProfileType type, Ground::ProfileDetail detail) const
 Print the profiling data to the given output stream.
 
void begin_step ()
 Begin a new grounding step.
 
void end_step ()
 End the current grounding step.
 
void accept (Ground::ProfileNode::Visitor const &visit) const
 Visit all profiling nodes with the given visitor function.
 

Detailed Description

Class storing profiling data for a program.

Member Function Documentation

◆ add()

auto CppClingo::Control::ProfileProgram::add ( Input::Stm const &  stm) -> Ground::ProfileNodeInternal &

Add a profiling node for a statement.

If a node for the given statement already exists, it is returned. Simple pointer equality is used to check for existing nodes.

◆ begin_step()

void CppClingo::Control::ProfileProgram::begin_step ( )

Begin a new grounding step.

This resets the per step data to zero.

◆ end_step()

void CppClingo::Control::ProfileProgram::end_step ( )

End the current grounding step.

This accumulates the per step data into the accumulated data.


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