Created
January 12, 2015 16:34
-
-
Save badboy/f54e0bb31ac07456f883 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:-20000000} | |
keyspacelen=${2:-1000000000} | |
exec ~/code/redis/src/redis-benchmark -r $keyspacelen -n $requests -t set -P 32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment