int record_end_time(enum stat_id stat_id, unsigned int item_id)
Records the elapsed time since the previous call to record_start_time.
void finalize_statistics(char *statlog)
Writes the statistics to statlog if provided, and frees assocated structure.
int init_statistics()
Initializes the entire stats module.
A single stat sample for a single item.
stat_id
The identifiers with which stats can be logged.
int record_stat(enum stat_id stat_id, unsigned int item_id, double stat, bool relog)
Records a statistic in the statlog.
double get_last_stat(enum stat_id stat_id, unsigned int item_id)
Returns the last statistic recorded.
Functions for the sending and receiving of statistics between ctrl and runtime.
struct stat_sample * get_stat_samples(enum stat_id stat_id, struct timespec *time, int *n_sample_out)
Samples the statistic with the provided stat_id.
int record_start_time(enum stat_id stat_id, unsigned int item_id)
Starts a measurement of elapsed time.
int remove_stat_item(enum stat_id stat_id, unsigned int item_id)
Un-registers an item so it can no longer have statistics registered, and will not be reported to the ...
int init_stat_item(enum stat_id stat_id, unsigned int item_id)
Initializes a new stat item so it can have stats registered and can be reported to the global control...
int increment_stat(enum stat_id stat_id, unsigned int item_id, double value)
Increments the given statistic by the provided value.