A statistics collector allows to access statistics produced by an analysis.
More...
#include <otawa/stats/StatCollector.h>
|
class | Collector |
| This interface class must be implemented by any program that wants to collect statistics for the current statistics information. More...
|
|
|
virtual | ~StatCollector (void) |
|
virtual cstring | name (void) const =0 |
| Name of the statistics (for human user, in english). More...
|
|
virtual cstring | unit (void) const =0 |
| Name of statistics unit (for human user, in english). More...
|
|
virtual bool | isEnum (void) const =0 |
| Test if the statistics concerns enumerated value. More...
|
|
virtual const cstring | valueName (int value)=0 |
| Get the name of an enumerated value (for human user, in english). More...
|
|
virtual int | total (void)=0 |
|
virtual void | collect (Collector &collector)=0 |
| Called to collect the statistics. More...
|
|
virtual int | mergeContext (int v1, int v2)=0 |
| This function allows to merge statistics of a same block in different contexts. More...
|
|
virtual int | mergeAgreg (int v1, int v2)=0 |
| This function allows to merge statistics when different blocks are aggregated. More...
|
|
A statistics collector allows to access statistics produced by an analysis.
Any specialized statistics provider must implements this class and store an instance in the StatInfo workspace instance. This allows generic processing of statistics by user interface applications.
otawa::StatCollector::~StatCollector |
( |
void |
| ) |
|
|
virtual |
void otawa::StatCollector::collect |
( |
Collector & |
collector | ) |
|
|
pure virtual |
bool otawa::StatCollector::isEnum |
( |
void |
| ) |
const |
|
pure virtual |
Test if the statistics concerns enumerated value.
If this method returns true, method valueName() can be called to collect names of enumerated values. The number of enumerated values is given by the total method.
- Returns
- True if the statistics are enumerated values.
int otawa::StatCollector::mergeAgreg |
( |
int |
v1, |
|
|
int |
v2 |
|
) |
| |
|
pure virtual |
This function allows to merge statistics when different blocks are aggregated.
int otawa::StatCollector::mergeContext |
( |
int |
v1, |
|
|
int |
v2 |
|
) |
| |
|
pure virtual |
This function allows to merge statistics of a same block in different contexts.
cstring otawa::StatCollector::name |
( |
void |
| ) |
const |
|
pure virtual |
Name of the statistics (for human user, in english).
virtual int otawa::StatCollector::total |
( |
void |
| ) |
|
|
pure virtual |
cstring otawa::StatCollector::unit |
( |
void |
| ) |
const |
|
pure virtual |
Name of statistics unit (for human user, in english).
const cstring otawa::StatCollector::valueName |
( |
int |
value | ) |
|
|
pure virtual |
Get the name of an enumerated value (for human user, in english).
May only be called if isEnum() returns true.
- Parameters
-
- Returns
- Name of the enumerated value.
The documentation for this class was generated from the following files: