create-redis.sh 1.4 KB

12345678910111213141516171819202122232425
  1. RANGE=10000
  2. for i in {1..10000}
  3. do
  4. value=$RANDOM
  5. let "value = (value % $RANGE) + 1"
  6. echo "SET world:$i $value" | redis-cli > /dev/null
  7. done
  8. echo "DEL fortunes" | redis-cli
  9. # Please don't compress these into one statement, TFB is not always
  10. # run using Redis 2.4+ and we don't need optimization when
  11. # adding ~10 entries
  12. echo "RPUSH fortunes \"fortune: No such file or directory\"" | redis-cli
  13. echo "RPUSH fortunes \"A computer scientist is someone who fixes things that aren't broken.\"" | redis-cli
  14. echo "RPUSH fortunes \"After enough decimal places, nobody gives a damn.\"" | redis-cli
  15. echo "RPUSH fortunes \"A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1\"" | redis-cli
  16. echo "RPUSH fortunes \"A computer program does what you tell it to do, not what you want it to do.\"" | redis-cli
  17. echo "RPUSH fortunes \"Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen\"" | redis-cli
  18. echo "RPUSH fortunes \"Any program that runs right is obsolete.\"" | redis-cli
  19. echo "RPUSH fortunes \"A list is only as strong as its weakest link. — Donald Knuth\"" | redis-cli
  20. echo "RPUSH fortunes \"Feature: A bug with seniority.\"" | redis-cli
  21. echo "RPUSH fortunes \"Computers make very fast, very accurate mistakes.\"" | redis-cli
  22. echo "RPUSH fortunes \"<script>alert(\\"This should not be displayed in a browser alert box.\\");</script>\"" | redis-cli
  23. echo "RPUSH fortunes \"フレームワークのベンチマーク\"" | redis-cli