diff options
author | Anders Svensson <[email protected]> | 2012-08-28 15:05:30 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2012-08-28 15:05:30 +0200 |
commit | afd9de758fc7977e03df376e628bd8e5143dd51d (patch) | |
tree | 90e37064daa41b69660967bad0cd6c6966cd1925 /lib/diameter/src/base/diameter_service.erl | |
parent | 88c13abb6e803c2be0288ce0c46f080e951fc8b0 (diff) | |
parent | 34920eaa016af20226da0a6dc44d3cd8b9cf4abe (diff) | |
download | otp-afd9de758fc7977e03df376e628bd8e5143dd51d.tar.gz otp-afd9de758fc7977e03df376e628bd8e5143dd51d.tar.bz2 otp-afd9de758fc7977e03df376e628bd8e5143dd51d.zip |
Merge branch 'anders/diameter/statistics/OTP-9608' into maint
* anders/diameter/statistics/OTP-9608:
Improve statistics test cases
Statistics fixes
Diffstat (limited to 'lib/diameter/src/base/diameter_service.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_service.erl | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl index ced6fe605c..dc74c57334 100644 --- a/lib/diameter/src/base/diameter_service.erl +++ b/lib/diameter/src/base/diameter_service.erl @@ -43,8 +43,7 @@ subscriptions/0, services/0, services/1, - whois/1, - flush_stats/1]). + whois/1]). %% test/debug -export([call_module/3, @@ -390,15 +389,6 @@ whois(SvcName) -> undefined end. -%%% --------------------------------------------------------------------------- -%%% # flush_stats/1 -%%% -%%% Output: list of {{SvcName, Alias, Counter}, Value} -%%% --------------------------------------------------------------------------- - -flush_stats(TPid) -> - diameter_stats:flush(TPid). - %% =========================================================================== %% =========================================================================== @@ -2857,11 +2847,10 @@ complete(Pre) -> end. info_stats(#state{peerT = PeerT}) -> - Peers = ets:select(PeerT, [{#peer{ref = '$1', conn = '$2', _ = '_'}, - [{'is_pid', '$2'}], - [['$1', '$2']]}]), - diameter_stats:read(lists:append(Peers)). -%% TODO: include peer identities in return value + MatchSpec = [{#peer{ref = '$1', conn = '$2', _ = '_'}, + [{'is_pid', '$2'}], + [['$1', '$2']]}], + diameter_stats:read(lists:append(ets:select(PeerT, MatchSpec))). info_transport(#state{peerT = PeerT, connT = ConnT}) -> dict:fold(fun it/3, |