dlinear
0.0.1
Delta-complete SMT solver for linear programming
|
Dataclass collecting statistics about some operation or process. More...
#include <Stats.h>
Public Member Functions | |
IterationStats (bool enabled, std::string class_name, std::string name_time="Time spent in Operations", std::string iterations_name="Total # of Iterations") | |
Construct an IterationStats object. | |
std::string | ToSegmentString () const override |
Convert the current state of the object to a formatted string, only including the specific part the Stat object is concerned about. | |
std::string | ToString () const override |
Convert the current state of the object to a formatted string. | |
void | Increase () |
Increase the iteration counter by one. | |
unsigned int | iterations () const |
Get read-only access to the iterations of the stats. | |
Public Member Functions inherited from dlinear::Stats | |
Stats (bool enabled, std::string class_name, std::string name_time="Time spent in Operations") | |
Construct a Stats object. | |
bool | enabled () const |
Check whether the stats is enabled. | |
Timer & | m_timer () |
Get read-write access to the timer of the stats. | |
const Timer & | timer () const |
Get read-only access to the timer of the stats. | |
Private Attributes | |
std::atomic< unsigned int > | iterations_ |
Atomic counter for the total number of iterations. | |
std::string | iterations_name_ |
Name to give to the iteration operation. | |
Additional Inherited Members | |
Protected Attributes inherited from dlinear::Stats | |
bool | enabled_ |
Flag to enable/disable the collection of statistics. | |
std::string | class_name_ |
Name of the class running the operation the Stats object is collecting statistics for. | |
std::string | operations_name_ |
Name of the operation the Stats object is collecting statistics for. | |
Dataclass collecting statistics about some operation or process.
Not only does it collect the cumulative time spent in a given operation, but also the total number of iterations.
|
explicit |
Construct an IterationStats object.
enabled | whether the Stats object should be enabled or not. Its value is propagated to the timer_ |
class_name | name of the class running the operation the Stats object is collecting statistics for |
name_time | name of the operation the Stats object is collecting statistics for |
iterations_name | name of the operation the Stats object is collecting statistics for |
void dlinear::IterationStats::Increase | ( | ) |
|
inlinenodiscard |
|
nodiscardoverridevirtual |
Convert the current state of the object to a formatted string, only including the specific part the Stat object is concerned about.
Reimplemented from dlinear::Stats.
|
nodiscardoverridevirtual |
Convert the current state of the object to a formatted string.
Reimplemented from dlinear::Stats.