Skip to content

Randomness enhancements.#63

Merged
evanmcc merged 2 commits intomasterfrom
pevm-randomness
Feb 12, 2013
Merged

Randomness enhancements.#63
evanmcc merged 2 commits intomasterfrom
pevm-randomness

Conversation

@evanmcc
Copy link
Copy Markdown
Contributor

@evanmcc evanmcc commented Jan 30, 2013

Sometimes you want randomness more than reproducability.

Introduce the option to use now() to initialize your rng.

To use, add the following line to your bb config file:
{rng_seed, now}.

Introduce the option to use now() to initialize your rng.

To use, add the following line to your bb config file:
{rng_seed, now}.
@seancribbs
Copy link
Copy Markdown
Contributor

@evanmcc What if that config key is undefined? Shouldn't we just use now() or os:timestamp()?

@evanmcc
Copy link
Copy Markdown
Contributor Author

evanmcc commented Jan 30, 2013

that config key is always defined, see basho_bench.app.src:

  {env, [
         %%
         %% Mode of load generation:
         %% max - Generate as many requests as possible per worker
         %% {rate, Rate} - Exp. distributed Mean reqs/sec
         %%
         {mode, {rate, 5}},

        %% <snip>

         %%
         {rng_seed, {42, 23, 12}}
        ]}

@evanmcc
Copy link
Copy Markdown
Contributor Author

evanmcc commented Jan 31, 2013

What about if I moved the definition from the env to the get call?

@seancribbs
Copy link
Copy Markdown
Contributor

Works for me. There seems to be no good reason to have that statically defined.

why someone might want to use a more random seed.
@evanmcc
Copy link
Copy Markdown
Contributor Author

evanmcc commented Feb 10, 2013

updated.

I think that since it's currently statically defined, I'd like to leave it as is to avoid breaking any currently existing code that relies on that functionality.

@slfritchie
Copy link
Copy Markdown
Contributor

+1 to merge, thanks!

evanmcc added a commit that referenced this pull request Feb 12, 2013
@evanmcc evanmcc merged commit 1580e59 into master Feb 12, 2013
@seancribbs seancribbs deleted the pevm-randomness branch February 12, 2013 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants