Created
March 11, 2014 20:26
-
-
Save badboy/9494252 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" == "help" ]; then | |
echo "Usage: $0 [requests] [keyspacelen]" | |
echo | |
echo "requests - Total number of requests (default 1000000)" | |
echo "keyspacelen - Keyspace from which a random number will be chosen" | |
echo " (default 9999999)" | |
echo | |
echo "Wrapper around redis-benchmark to quickly fill a Redis instance with random data." | |
echo "The default values will result in about 100 MB data inserted." | |
exit | |
fi | |
requests=${1:-1000000} | |
keyspacelen=${2:-9999999} | |
exec ~/code/redis/src/redis-benchmark -r $keyspacelen -n $requests -t set |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment