basho/basho_bench — pull request #44 by slfritchie (2012-07-31 01:11:09+00:00)
Title: Add value_generator_blob_file config option to value generator.

If present, e.g.,

{value_generator_blob_file, "/path/to/a/file"}.

... then the value generator will use the contents of that file instead
of the (mostly) completely random bytes that are generated by
`crypto:rand_bytes/1`. By allowing the specify an arbitrary file,
the user has control over much entropy is present in the values that
basho_bench generates. The user can specify a file with a single
repeating byte (which would yield the same values that the basho_bench
value generator `{fixed_char, Size}` will yield, or specify a file
that contains app-specific data such as representative JSON samples,
or a file that contains output from a command like `dd if=/dev/urandom`,
which would yield an extremely low amount of entropy similar to
what the basho_bench key generator `{fixed_bin, Size}` yields.

The main reason for adding this kind of user-controllable entropy
for value blobs is to study the compression rates of Riak storage
backends such as ELevelDB.