antirez/redis — pull request #2018 by krzycz (2014-09-19 16:10:03+00:00)
Title: redis-benchmark: add option for sequential keys

Added support for a special value `-1` of `` (`-r -1`) that forces the test to use a unique, sequential key for each request.

It may be used to populate DB with exact number of objects, and/or to provide that each and every object in DB has been queried/updated during the test.

Note that without `-r` option, the same key is used for each request (the whole test is run on a single object). On the other hand, the command i.e. `-t set -n 100 -r 100` does not guarantee that exactly 100 objects will be created or updated, as the keys are randomly drew from the specified range - some values may occur multiple times, while the other are not used at all. (Running the above example on an empty DB will usually result in about 60 objects.)

The command `-t set -n 100 -r -1` will populate DB with exactly 100 objects with the following keys: `key:000000000000", "key:000000000001", ..., "key:000000000100`.