|
smats
0.0.1
Satisfability Modulo Arithmetic Theories Symbols
|
#include <stats.h>
Public Member Functions | |
Stats (bool enabled, std::string class_name, std::string name_time="Time spent in Operations") | |
Stats (const Stats &other)=default | |
Stats & | operator= (const Stats &other)=default |
Stats & | operator+= (const Stats &other) |
Stats | operator+ (const Stats &other) const |
bool | enabled () const |
Timer & | m_timer () |
const Timer & | timer () const |
virtual std::string | to_segment_string () const |
virtual std::string | to_string () const |
Private Attributes | |
Timer | timer_ |
Timer to measure the time spent in operations. | |
Measure the statistics of the software.
Namely, measure the time spent in operations.
|
explicit |
Construct a new Stats object.
The enabled
flag is used to enable or disable the stats measuring. The class_name
is the name of the class the stats are measuring, while the name_time
is the prompt to specify what operation the time has been measured of. They are shown in the output of the to_string() method.
enabled | whether the stats measuring is enabled |
class_name | name of the class the stats are measuring |
name_time | prompt to specify what operation the time has been measured of |
|
inlinenodiscard |
Check whether the stats is enabled.
|
inlinenodiscard |
Get read-write access to the timer of the stats.
|
inlinenodiscard |
Get read-only access to the timer of the stats.
|
nodiscardvirtual |
Convert the current state of the object to a formatted string, only including the specific part the Stat object is concerned about
Reimplemented in smats::IterationStats.
|
nodiscardvirtual |
Convert the current state of the object to a formatted string
Reimplemented in smats::IterationStats.