Skip to content

Commit

Permalink
Fix compiler error, minor whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
slfritchie committed Dec 10, 2015
1 parent b8f1e31 commit dfdafc8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/basho_bench_stats.erl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,14 @@ init([]) ->

StatsWriter = basho_bench_config:get(stats, csv),
{ok, StatsSinkModule} = normalize_name(StatsWriter),
false =/= code:is_loaded(StatsSinkModule),
_ = (catch StatsSinkModule:module_info()),
case code:is_loaded(StatsSinkModule) of
{file, _} ->
ok;
false ->
?WARN("Cannot load module ~p (derived on ~p, from the config value of 'stats' or compiled default)\n",
[StatsSinkModule, StatsWriter])
end,
%% Schedule next write/reset of data
ReportInterval = timer:seconds(basho_bench_config:get(report_interval)),

Expand Down Expand Up @@ -248,7 +255,7 @@ process_stats(Now, #state{stats_writer=Module}=State) ->

%% Write summary
Module:process_summary(State#state.stats_writer_data,
Elapsed, Window, Oks, Errors),
Elapsed, Window, Oks, Errors),

%% Dump current error counts to console
case (State#state.errors_since_last_report) of
Expand Down

1 comment on commit dfdafc8

@jadeallenx
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 awesome

Please sign in to comment.