[S] Change in ...osmo-s1gw[master]: s1gw_metrics: add ctr_list/0 and gauge_list/0
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40647?usp=email ) Change subject: s1gw_metrics: add ctr_list/0 and gauge_list/0 ...................................................................... s1gw_metrics: add ctr_list/0 and gauge_list/0 Allow other modules to obtain lists of counters/gauges. This will be used in a follow-up patch registering per-eNB counters. Change-Id: I21f9b2b3dfe6b454b9dee2750cc692fd2dc13475 --- M src/s1gw_metrics.erl 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/47/40647/1 diff --git a/src/s1gw_metrics.erl b/src/s1gw_metrics.erl index 6eb917f..00e603d 100644 --- a/src/s1gw_metrics.erl +++ b/src/s1gw_metrics.erl @@ -38,11 +38,13 @@ ctr_reset/1, ctr_inc/1, ctr_inc/2, + ctr_list/0, gauge_reset/1, gauge_set/2, gauge_inc/1, gauge_inc/2, - gauge_dec/1]). + gauge_dec/1, + gauge_list/0]). -include_lib("kernel/include/logger.hrl"). -include("s1gw_metrics.hrl"). @@ -141,6 +143,9 @@ ctr_inc(Name) -> ctr_inc(Name, 1). +-spec ctr_list() -> [counter()]. +ctr_list() -> ?S1GW_COUNTERS. + %%%%%%%%%%%%% %% GAUGE APIs %%%%%%%%%%%%% @@ -167,5 +172,8 @@ gauge_dec(Name) -> gauge_inc(Name, -1). +-spec gauge_list() -> [gauge()]. +gauge_list() -> ?S1GW_GAUGES. + %% vim:set ts=4 sw=4 et: -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40647?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I21f9b2b3dfe6b454b9dee2750cc692fd2dc13475 Gerrit-Change-Number: 40647 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
participants (1)
-
fixeria