X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fdiameter.comm%2FMessageStatistics.hpp;fp=include%2Fanna%2Fdiameter.comm%2FMessageStatistics.hpp;h=9c502e24a4927e1a9b0b66397fa7c9604626063b;hp=0000000000000000000000000000000000000000;hb=028006fc5ee34967fcfffff24a2b1c8b410c26c3;hpb=3b71d6454d211ec50c2f3e04b04c607c382f2f29 diff --git a/include/anna/diameter.comm/MessageStatistics.hpp b/include/anna/diameter.comm/MessageStatistics.hpp new file mode 100644 index 0000000..9c502e2 --- /dev/null +++ b/include/anna/diameter.comm/MessageStatistics.hpp @@ -0,0 +1,57 @@ +// ANNA - Anna is Not Nothingness Anymore // +// // +// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo // +// // +// See project site at http://redmine.teslayout.com/projects/anna-suite // +// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE // + + +#ifndef anna_diameter_comm_MessageStatistics_hpp +#define anna_diameter_comm_MessageStatistics_hpp + +// Standard +#include +#include +#include + +// Project +#include +#include + +namespace anna { + +namespace xml { + class Node; +} + +namespace diameter { + +namespace comm { + + + +class MessageStatistics { + + public: + MessageStatistics() {;} + ~MessageStatistics() {;} + + struct ConceptType { enum _v { SentRequestProcessingTime, ReceivedMessageSize }; }; + + void initialize(const std::string &name) throw(anna::RuntimeException); + void process(const ConceptType::_v &conceptType, const anna::diameter::CommandId &cid, const double & value) throw(anna::RuntimeException); + anna::statistics::Accumulator *getAccumulator() const throw() { return a_accumulator; } + + private: + anna::statistics::Accumulator *a_accumulator; + typedef std::pair ConceptId; + typedef std::map concepts_map_t; + typedef std::map::const_iterator concepts_map_it; + concepts_map_t a_concepts; +}; + +} +} +} + +#endif