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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ ebin/
deps/
tests/
basho_bench
*~
#*#

5 changes: 0 additions & 5 deletions src/basho_bench.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,5 @@
%% {fixed_bin, N} - Fixed size binary blob of N bytes
%%
{value_generator, {fixed_bin, 100}},

%%
%% RNG Seed -- ensures consistent generation of key/value sizes (but not content!)
%%
{rng_seed, {42, 23, 12}}
]}
]}.
10 changes: 9 additions & 1 deletion src/basho_bench_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,16 @@ init([SupChild, Id]) ->
%%
%% NOTE: If the worker process dies, this obviously introduces some entroy
%% into the equation since you'd be restarting the RNG all over.
%%
%% The RNG_SEED is static by default for replicability of key size
%% and value size generation between test runs.
process_flag(trap_exit, true),
{A1, A2, A3} = basho_bench_config:get(rng_seed),
{A1, A2, A3} =
case basho_bench_config:get(rng_seed, {42, 23, 12}) of
{Aa, Ab, Ac} -> {Aa, Ab, Ac};
now -> now()
end,

RngSeed = {A1+Id, A2+Id, A3+Id},

%% Pull all config settings from environment
Expand Down