diff --git a/.gitignore b/.gitignore index 907f6c0ce..5d78da55e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ ebin/ deps/ tests/ basho_bench +*~ +#*# diff --git a/src/basho_bench.app.src b/src/basho_bench.app.src index ab2a41a58..495cd56c9 100644 --- a/src/basho_bench.app.src +++ b/src/basho_bench.app.src @@ -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}} ]} ]}. diff --git a/src/basho_bench_worker.erl b/src/basho_bench_worker.erl index 972acbeb9..a1c8814f0 100644 --- a/src/basho_bench_worker.erl +++ b/src/basho_bench_worker.erl @@ -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