aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_service.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-08-23 20:53:53 +0200
committerAnders Svensson <[email protected]>2012-08-24 13:12:58 +0200
commite93b194345b563e9f5bc6264e577ef839d2f1ab2 (patch)
tree554d080fe3f324c43e96b35423da4a0b89ad4fb1 /lib/diameter/src/base/diameter_service.erl
parentcfea5eea406ba3af96588ff458e55de9a149d9c5 (diff)
downloadotp-e93b194345b563e9f5bc6264e577ef839d2f1ab2.tar.gz
otp-e93b194345b563e9f5bc6264e577ef839d2f1ab2.tar.bz2
otp-e93b194345b563e9f5bc6264e577ef839d2f1ab2.zip
Statistics fixes
Statistics are deleted as a consequence of diameter:remove_transport/2.
Diffstat (limited to 'lib/diameter/src/base/diameter_service.erl')
-rw-r--r--lib/diameter/src/base/diameter_service.erl21
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 3dfdcee2b2..591b99d7cc 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,
@@ -388,15 +387,6 @@ whois(SvcName) ->
undefined
end.
-%%% ---------------------------------------------------------------------------
-%%% # flush_stats/1
-%%%
-%%% Output: list of {{SvcName, Alias, Counter}, Value}
-%%% ---------------------------------------------------------------------------
-
-flush_stats(TPid) ->
- diameter_stats:flush(TPid).
-
%% ===========================================================================
%% ===========================================================================
@@ -2820,11 +2810,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,