#include <reporter.hh>
Public Member Functions | |
double | get_time () |
void | print () |
void | print (std::ostream &out) |
void | set_alg_name (std::string s) |
void | set_file_name (std::string s) |
void | set_info (std::string s, double a, const std::string &long_name) |
void | set_info (std::string s, double a) |
void | set_obligatory_keys (std::string _alg_name, std::string _file_name, std::string _problem, size_int_t _states_stored, size_int_t _succs_calls) |
void | set_problem (std::string s) |
void | set_states_stored (size_int_t stored) |
void | set_succs_calls (size_int_t calls) |
void | start_timer () |
void | stop_timer () |
Protected Attributes | |
std::string | alg_name |
std::string | file_name |
double | init_time |
std::string | problem |
std::map< std::string, double > | specific_info |
std::map< std::string, std::string > | specific_long_name |
size_int_t | states_stored |
size_int_t | succs_calls |
double | time |
timeinfo_t | time_info |
vminfo_t | vm_info |
Class reporter_t is used to measure and report (in standard format) statistics about the computation of an algorithm.
double get_time | ( | ) | [inline] |
Returns the time (to be used after stop_time); usefull e.g. for calculating speed
void print | ( | ) |
Prints the report into the file with 'standard name' (at the moment file_name.report).
void print | ( | std::ostream & | out | ) |
Prints the report into the given ostream.
void set_alg_name | ( | std::string | s | ) | [inline] |
Sets name of the algorithm.
void set_file_name | ( | std::string | s | ) | [inline] |
Sets name of the dve file which is the input of the algorithm.
void set_info | ( | std::string | s, | |
double | a | |||
) | [inline] |
Sets any specific information which we want to report (e.g., set_info("states", states_num);
void set_obligatory_keys | ( | std::string | _alg_name, | |
std::string | _file_name, | |||
std::string | _problem, | |||
size_int_t | _states_stored, | |||
size_int_t | _succs_calls | |||
) | [inline] |
Sets all obligatory keys (algorithm name, input file name, problem, number of states and number of calling successor function)
void set_problem | ( | std::string | s | ) | [inline] |
Sets the description of the problem that the algorithm solves (e.g., 'reachability x==3', 'ltl GF hungry == 0')
void set_states_stored | ( | size_int_t | stored | ) | [inline] |
Sets the number of stored states
void set_succs_calls | ( | size_int_t | calls | ) | [inline] |
Sets the number of calling get_succs() function
void start_timer | ( | ) | [inline] |
Starts the timer which measure the (real) time taken by computation. Convention: This should be called after inicializations.
void stop_timer | ( | ) | [inline] |
Stops the timer.