Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge remote-tracking branch 'iilyak/2540-Fix-broken-tests-for-couch_…
…replicator'

This closes #4
  • Loading branch information
kxepal committed Jan 12, 2015
2 parents 1bcffbd + 0be906a commit 20912b3e06bba9f6976dc715068390cfab7c4147
Showing 2 changed files with 12 additions and 1 deletion.
@@ -16,6 +16,7 @@
start/0,
stop/0,
fetch/0,
reload/0,
sample/1,
new/2,
delete/1,
@@ -40,6 +41,9 @@ stop() ->
fetch() ->
couch_stats_aggregator:fetch().

reload() ->
couch_stats_aggregator:reload().

-spec sample(any()) -> stat().
sample(Name) ->
[{Name, Info}] = folsom_metrics:get_metric_info(Name),
@@ -16,7 +16,8 @@

-export([
fetch/0,
flush/0
flush/0,
reload/0
]).

-export([
@@ -43,6 +44,9 @@ fetch() ->
flush() ->
gen_server:call(?MODULE, flush).

reload() ->
gen_server:call(?MODULE, reload).

start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).

@@ -59,6 +63,9 @@ handle_call(fetch, _from, #st{stats = Stats}=State) ->
{reply, {ok, Stats}, State};
handle_call(flush, _From, State) ->
{reply, ok, collect(State)};
handle_call(reload, _from, #st{stats = Stats}=State) ->
{ok, Descriptions} = reload_metrics(),
{reply, ok, State#st{descriptions=Descriptions}};
handle_call(Msg, _From, State) ->
{stop, {unknown_call, Msg}, error, State}.

0 comments on commit 20912b3

Please sign in to comment.