Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/basho_bench.hrl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

-define(FAIL_MSG(Str, Args), ?ERROR(Str, Args), basho_bench_app:halt_or_kill()).
-define(FAIL_MSG(Str, Args), ?ERROR(Str, Args), basho_bench_app:stop_or_kill()).
-define(STD_ERR(Str, Args), io:format(standard_error, Str, Args)).

-define(CONSOLE(Str, Args), lager:info(Str, Args)).
Expand Down
6 changes: 3 additions & 3 deletions src/basho_bench_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
-export([start/0,
stop/0,
is_running/0,
halt_or_kill/0]).
stop_or_kill/0]).

%% Application callbacks
-export([start/2, stop/1]).
Expand Down Expand Up @@ -64,14 +64,14 @@ stop() ->
is_running() ->
application:get_env(basho_bench_app, is_running) == {ok, true}.

halt_or_kill() ->
stop_or_kill() ->
%% If running standalone, halt and kill node. Otherwise, just
%% kill top supervisor.
case application:get_env(basho_bench,app_run_mode) of
{ok, included} ->
exit(whereis(basho_bench_sup),kill);
_ ->
init:stop()
init:stop(1)
end.

%% ===================================================================
Expand Down