mCaptcha-cache/scripts/bench.sh

22 lines
705 B
Bash
Raw Permalink Normal View History

2021-06-03 14:49:05 +03:00
#!/bin/sh
readonly NUM_REQUESTS=1000000
2021-06-09 17:11:58 +03:00
readonly CAPTCHA_NAME=mycounter
readonly DURATION=45
scripts/setupbench.py $CAPTCHA_NAME $DURATION
2021-06-03 14:49:05 +03:00
echo "running set and get without pipelining"
redis-benchmark -n 1000000 -t set,get -q
echo "mCaptcha cache without piplining"
2021-06-09 17:11:58 +03:00
redis-benchmark -n $NUM_REQUESTS -q MCAPTCHA_CACHE.ADD_VISITOR $CAPTCHA_NAME
redis-benchmark -n $NUM_REQUESTS -q MCAPTCHA_CACHE.GET $CAPTCHA_NAME
2021-06-03 14:49:05 +03:00
echo "running set and get with pipelining"
redis-benchmark -n 1000000 -t set,get -q -P 16
echo "mCaptcha cache with piplining"
2021-06-09 17:11:58 +03:00
redis-benchmark -P 16 -n $NUM_REQUESTS -q MCAPTCHA_CACHE.ADD_VISITOR $CAPTCHA_NAME
redis-benchmark -P 16 -n $NUM_REQUESTS -q MCAPTCHA_CACHE.GET $CAPTCHA_NAME