Skip to content

Instantly share code, notes, and snippets.

@badboy
Created March 11, 2014 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badboy/9494252 to your computer and use it in GitHub Desktop.
Save badboy/9494252 to your computer and use it in GitHub Desktop.
#!/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