Skip to content

tnm/vulcan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vulcan

vulcan generates test keys for Redis.

usage

vulcan is just a single C file. To use, run:

make

Running make in the vulcan/ directory will produce an executable called vulcan.

vulcan expects you to have hiredis available for linking. (You can brew install hiredis on OS X, do a source install, or just use your standard distro packaging.) vulcan also expects pthreads.

Usage is straight-forward:

./vulcan [number of keys] [string|list|set|zset] -h [host] -p [port]

The first argument is the number of keys you wish to generate. vulcan restricts this only to whatever LONG_MAX is on your system, although I'd advise you use fewer keys than that.

The second argument is one of string, list, set, or zset. This is the Redis datatype you wish to generate.

The other options are not required. If you don't pass in host or port arguments, vulcan will use defaults of 127.0.0.1 and port 6390 (note that, for safety, that port number is not the standard Redis port of 6379). You do need to pass in both host and port — vulcan won't assume port 6500 is also localhost. You need both. Otherwise it'll get mad.

vulcan uses 40 threads to speed up the key generation. On a basic laptop, vulcan can generate and set 100,000 keys in about 600 milliseconds (for any datatype).

vulcan will also output some timing data on stderr when run.

example

$ ./vulcan 100000 string -h localhost -p 6391
[vulcan] Using hostname localhost and port 6391
[vulcan] set 100000 strings in 623.819000 milliseconds
./vulcan 100000 set -h localhost -p 6391
[vulcan] Using hostname localhost and port 6391
[vulcan] set 100000 sets in 647.544000 milliseconds
$ ./vulcan 10000 zset
[vulcan] Using hostname 127.0.0.1 and port 6390
[vulcan] set 10000 zsets in 67.041000 milliseconds
$ ./vulcan 10000 string -h localhost -p 6391
[vulcan] Using hostname localhost and port 6391
[vulcan] set 10000 strings in 73.126000 milliseconds

license

MIT

About

Generate test data for Redis in C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published