X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fstatistics%2FAccumulator.hpp;h=c13bbf1354005f05be8952fef93f51e95dd577d3;hb=c6b62fd814b6e5b4e3ba65b6f092f6aa4e1d298d;hp=98d4624f589776b889c192aac77ce3d1941a198c;hpb=66409396bebc1cfeb63d404f3aee8639159298d5;p=anna.git diff --git a/include/anna/statistics/Accumulator.hpp b/include/anna/statistics/Accumulator.hpp index 98d4624..c13bbf1 100644 --- a/include/anna/statistics/Accumulator.hpp +++ b/include/anna/statistics/Accumulator.hpp @@ -89,14 +89,31 @@ public: /** * Constructor. + * + * @param name Accumulator name */ - Accumulator(); + Accumulator(const std::string &name) : a_name(name) {}; /** * Destructor. */ ~Accumulator(); + /** + * Adds a new statistic concept through the accumulator, to ease the concept name creation, + * which will be a string defined by: concept name + ': ' + accumulator name. + * + * @param description Concept description; e.g.: processing time, messages size, etc. + * @param unit Concept unit description + * @param integerNatureSample Most of cases we will measure 'time' with the unit which force integer values + * (is more intuitive 850 msecs than 0,850 secs). Then, it is @em true by default. + * This is useful to advice better representation for some indicators like minimum/maximum + * within integer samples. + * + * @return Assigned concept identification number (sequence) + */ + int addConcept(const std::string & description, const std::string & unit, const bool & integerNatureSample = true) throw(); + /** * Process new value for the sample. @@ -189,6 +206,8 @@ public: private: + std::string a_name; + void initialize(const int & conceptId) throw(); _concept_data_t * getConcept(const int & conceptId) const throw(anna::RuntimeException); // Return NULL if no data is found for the concept Id