Skip to the content.

Protocol Statistics


Definition

It is a structure maintained by every protocol instance of an MMT handler to record the statistics of the protocol. The protocol statistics are updated within MMT core and provides a harmonized way to access these statistics. Whatever the protocol is, the access to its statistics is the same.

Protocol Statistics Internals

Implementation

Protocol statistics have:

As an application/protocol can appear in different protocol paths (facebook above SSL and HTTP), there will be one statistics instance per protocol path. In the following figure, Facebook has two statistics instances; one for path TCP.SSL.Facebook and one for path TCP.HTTP.Facebook.

MMT protocol statistics abstract view

API

Common Attributes

MMT provides a set of attributes (common to all protocols) to access the protocol statistics (src/mmt_core/public_include/data_defs.h:279-291):

User API

   proto_statistics_t * get_protocol_stats(mmt_handler_t *mmt_handler, mmt_proto_id_t proto_id);

Returns a pointer to the protocol statistics (list) of the given protocol (src/mmt_core/public_include/mmt_core.h:1101).

   void get_protocol_stats_path(mmt_handler_t *mmt_handler, proto_statistics_t *stats, proto_hierarchy_t *proto_hierarchy);

Provides the protocol path of the given statistics instance (src/mmt_core/public_include/mmt_core.h:1121).

   void get_children_stats(proto_statistics_t * parent_stats, proto_statistics_t * children_stats);

Provides the aggregation of the children protocol statistics (src/mmt_core/public_include/mmt_core.h:1111).

   void reset_statistics(proto_statistics_t * stats);

Resets the given protocol statistics instance (src/mmt_core/public_include/mmt_core.h:1131).

   void enable_protocol_statistics(mmt_handler_t *mmt_handler);

   void disable_protocol_statistics(mmt_handler_t *mmt_handler);

Enables/Disables the statistics maintenance for the protocol of the given MMT Handler.

Open Issues