Module: sip-router Branch: andrei/counters Commit: efb487e2a47d7c714821d506b5efe8cf46d632a6 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=efb487e2...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Sun Aug 8 19:36:48 2010 +0200
kcore stats: rewrote in terms of the counters api
Most of the original kamailio statistics functions and data types are now wrappers over sr counters. The only important usage difference is that sr counters are uniquely identified by group and name (one can have counters with the same name if they are in different groups), while kamailio stats vars had unique names. This means that when using the kamailio get_stat(name) the first counter matching that name will be returned (in the future this kind of usage should be obsoleted).
Removed functions (not needed): get_stats_collector() destroy_stats_collector() Removed data types: stats_collector module_stats New functions: stats_support() - partially replaces get_stats_collector(). get_stat_name() - returns the name of a stat_var. get_stat_module() - returns the module of a stat_var.
---
lib/kcore/kstats_wrapper.c | 105 ++++++++++++++++++ lib/kcore/kstats_wrapper.h | 171 ++++++++++++++++++++++++++++++ lib/kcore/statistics.c | 251 +------------------------------------------- lib/kcore/statistics.h | 104 +------------------ 4 files changed, 279 insertions(+), 352 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=efb4...