Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Simplify stat reloading functionality
  • Loading branch information
b20n authored and rnewson committed Aug 19, 2014
1 parent dfc415c commit 870e28498cf4699ba3633c4a5998c10e8cb3c930
Showing 1 changed file with 4 additions and 4 deletions.
@@ -71,11 +71,11 @@ reload_metrics() ->
Existing = couch_stats:list(),
Current = load_metrics_for_applications(),
ToDelete = lists:foldl(
fun({_, {Name, [{type, Type}, _]}}, Acc) ->
E = {Name, [{type, Type}]},
case sets:is_element(E, Acc) of
fun({Name, Props}=Stat, Acc) ->
Type = proplists:get_value(type, Props),
case sets:is_element(Stat, Acc) of
true ->
sets:del_element(E, Acc);
sets:del_element(Stat, Acc);
false ->
couch_stats:new(Type, Name),
Acc

0 comments on commit 870e284

Please sign in to comment.