summaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/rate_ctr.h
Commit message (Collapse)AuthorAgeFilesLines
* Doxygen: fix documentation of rate_ctr_for_each_counter()Vadim Yanitskiy2019-03-271-4/+0
| | | | | | | | | | Doxygen was confused by duplicated documentation for both definition and declaration of rate_ctr_for_each_counter(). Moreover, both variants contained some mistakes. Let's avoid this duplication and keep the only (corrected) one. Change-Id: Icca2d4a95bd5f96ae85a86909ec90fb8677cacf3
* rate_ctr: Add rate_ctr_inc2() as convenience wrapperHarald Welte2018-02-241-0/+9
| | | | | | | rate_ctr_inc2() is slightly easier to use than the old rate_ctr_inc() variant. Change-Id: Ie00706be201c32ec2981ea38b70354ed85e1aefd
* rate_ctr: Enforce counter (and ctr_group) names are valid identifiersHarald Welte2017-10-241-1/+1
| | | | | | | | | | | | | | As rate counters are automatically exposed on the CTRL interface, we need to make sure they don't contain special characters such as '.' which are not permitted/supported by CTRL. In order to be able to run old versions of osmocom programs with libosmocore versions after this commit, we introduce some special name mangling: Any '.' in the names are replaced with ':' during counter group registration, if valid identifiers can be obtained this way. Change-Id: Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56
* doxygen: unify use of \file across the boardNeels Hofmeyr2017-06-231-3/+1
| | | | | | | | | | | | | | | | | Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
* doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr2017-06-231-31/+31
| | | | | | | | | | Especially for short descriptions, it is annoying to have to type \brief for every single API doc. Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes the first sentence of an API doc as the brief description. Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
* Update doxygen annotations in libosmocoreHarald Welte2016-05-051-2/+5
| | | | | This adds and improves doxygen API descriptions all over libosmocore, reducing the 'white spots' that don't have any documentation.
* some comments / fixed typosNeels Hofmeyr2015-12-211-0/+1
|
* gprs-ns/stats: When the NSVCI is updated, update the stats counterHolger Hans Peter Freyther2015-11-041-0/+5
| | | | | | | | | | | The NS object is created with an unknown identity and only after the reset procedure has progressed (completed?) we know the real ID for this peer. Before nobody has looked at the idx values (this could have been seen with the CTRL interface) but with statsd the wrong NSVCI becomes obvious. Add routines to update the idx and I don't know if the change of idx is causing any issues but we will find that out soon.
* stats: Limit reporting by class idJacob Erlbeck2015-11-021-0/+2
| | | | | | | | | | | | | | | This commit adds class_id fields to the rate_ctr and stat_item group descriptions. The stats reporter code is extended to only process groups whose class_id does not exceed a per reporter max_class level. If the class_id is not set, the code assumes 'global' for groups with idx == 0 and 'subscriber' otherwise. The following vty command is added to config-stats: level (global|peer|subscriber) Set the maximum group level Sponsored-by: On-Waves ehf
* core: Extend rate_ctr by helper functionsJacob Erlbeck2015-10-281-0/+19
| | | | | | | | | | | | | | | | | | | | | | | For global value reporting, some additional helper functions are needed. The statsd protocol expects differential counter values, which are currently not provided by rate_ctr (except for s/m/h/d intervals). This commit adds several helper functions to rate_ctr: - rate_ctr_difference returns the counter delta since the last call to this function for a given counter - rate_ctr_for_each_counter iterates through each counter of a group - rate_ctr_for_each_group iterates through all globally registered counter groups Note that the rate_ctr_difference function can only be used by a single backend, since it modifies the 'previous' field in the rate_ctr obj. Sponsored-by: On-Waves ehf
* include: Switch to #pragma once patternSylvain Munaut2014-06-161-3/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-181-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* doxygen: Add docs for rate_ctrHarald Welte2011-08-171-26/+34
|
* stats: Fix the compiler warningsHolger Hans Peter Freyther2011-04-181-1/+1
| | | | Do not remove the const, include strings.h for strcmp
* Add functions to search for rate counters by nameDaniel Willmann2011-04-091-0/+2
| | | | * rate_ctr_get_group_by_name_idx, rate_ctr_get_by_name
* vty: move vty_out_rate_ctr_group prototype to osmocom/vty/misc.hPablo Neira Ayuso2011-03-281-3/+0
| | | | Before this patch, it was in osmocom/core/rate_ctr.h
* include: reorganize headers file to include/osmocom/[gsm|core]Pablo Neira Ayuso2011-03-231-0/+81
This patch moves all GSM-specific definitions to include/osmocom/gsm. Moreover, the headers in include/osmocore/ have been moved to include/osmocom/core. This has been proposed by Harald Welte and Sylvain Munaunt. Tested with `make distcheck'. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>