Commit Graph

10 Commits

Author SHA1 Message Date
Neels Hofmeyr 17518fe393 doxygen: unify use of \file across the board
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
2017-06-23 00:18:23 +00:00
Neels Hofmeyr 87e4550585 doxygen: enable AUTOBRIEF, drop \brief
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
2017-06-23 00:18:22 +00:00
Jacob Erlbeck ac4ed17dbd stats: Add OSMO prefix to STAT_ITEM_NOVALUE_ID
This symbol is globally visible and therefore should have an OSMO
prefix like the other identifiers exported by stat_item.h.

Sponsored-by: On-Waves ehf
2015-12-08 10:33:15 +01:00
Jacob Erlbeck af5bad5ed0 stat: Explicitly support stat_items without unit
Add OSMO_STAT_ITEM_NO_UNIT for stat items without an unit. The
statsd reporter uses gauges ("g") to report them.

Sponsored-by: On-Waves ehf
2015-12-08 10:33:04 +01:00
Holger Hans Peter Freyther 495b0dbd24 gprs-ns/stats: When the NSVCI is updated, update the stats counter
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.
2015-11-04 14:39:37 +01:00
Jacob Erlbeck bc9d9aced8 stats: Limit reporting by class id
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
2015-11-02 15:39:31 +01:00
Jacob Erlbeck fc9533d6c4 stats: Add osmo_ name prefix to identifiers
Since the the stat_item and stats functions and data types are meant
to be exported, they get an osmo_ prefix.

Sponsored-by: On-Waves ehf

[hfreyther: Prepended the enum values too. This was requested by
Jacob]
2015-11-02 15:39:01 +01:00
Jacob Erlbeck c6a7108828 stats: Add stat_item_for_each functions
This commit adds the following functions:

  stat_item_for_each_group     Call a handler for each group
  stat_item_for_each_item      Call a handler for each item of a
                               group

Sponsored-by: On-Waves ehf
2015-10-28 23:51:24 +01:00
Jacob Erlbeck b27b352e93 stats: Use a global index for stat item values
Currently each stat item has a separate index value which basically
counts each single value added to the item and which can be used by
a reporter to get all new values that have not been reported yet.
The drawback is, that such an index must be stored for each stat
item.

This commit introduces a global index which is incremented for each
new stat item value. This index is then stored together with the item
value. So a single stored index per reporter is sufficient to make
sure that only new values are reported.

Sponsored-by: On-Waves ehf
2015-10-28 23:51:24 +01:00
Jacob Erlbeck 9732cb4a92 stats: Add stat_item for value monitoring
This commit adds instrumentation function to gather measurement
and statistical values similar to counter groups.

Multiple values can be stored per item, which can be retrieved in
FIFO order. Getting values from the item does not modify its state to
allow for multiple independant backends (e.g. VTY and statd).

When a new value is set, the oldest value gets silently overwritten.
Lost values are skipped when getting values from the item.

Sponsored-by: On-Waves ehf
2015-10-28 23:51:04 +01:00