Skip to content

Commit

Permalink
Added option to disable metrics. Removed testing doc to move to docum…
Browse files Browse the repository at this point in the history
…entation
  • Loading branch information
Albert Schimpf committed Nov 13, 2019
1 parent 184d51b commit 3f8251a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 111 deletions.
109 changes: 0 additions & 109 deletions TESTING.md

This file was deleted.

9 changes: 8 additions & 1 deletion config/sys.config.src
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
]},



{riak_core, [
%% riak directories
{ring_state_dir, "${ROOT_DIR_PREFIX}${DATA_DIR_PREFIX}data_riak_core"},
Expand All @@ -38,11 +37,19 @@
{verify_directories, false}
]},


{antidote, [
%% antidote data directory
{data_dir, "${ROOT_DIR_PREFIX}${DATA_DIR_PREFIX}data_antidote"}

%% stats:
%% Enables or disables metrics collection for this node. Can be disabled on slow nodes to improve performance.
%% true -> enables collecting statistics via the antidote_stats module
%% false -> disables all statistics collection
%{stats, true},

%% extended_stats:
%% Expensive metric collection for all erlang processes.
%% true -> process queues and reductions are monitored for busy processes
%% false -> single process monitoring disables
%{extended_stats, true},
Expand Down
2 changes: 1 addition & 1 deletion include/antidote.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,4 @@
}).
-type snapshot_get_response() :: #snapshot_get_response{}.

-define(STATS(Type), gen_server:cast(antidote_stats_collector, Type)).
-define(STATS(Type), case application:get_env(antidote, stats, true) of true -> gen_server:cast(antidote_stats_collector, Type); _ -> ok end).
1 change: 1 addition & 0 deletions src/antidote.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
{enable_logging, true},
{auto_start_read_servers, true},
{data_dir, "data_antidote"},
{stats, true},
{extended_stats, true}
]}
]}.

0 comments on commit 3f8251a

Please sign in to comment.