This project serves as Rust learning materials.
- DEL
- EXPIRE
- TTL
- EXISTS
- FLUSH
- GET
- SET
- SETNX
- MGET
- MSET
- GETSET
- GETDEL
- INCR
- DECR
- INCRBY
- DECRBY
- LPOP
- RPOP
- LPUSH
- RPUSH
- LLEN
- LRANGE
- LREM
- LSET
- LTRIM
- BLPOP
- BRPOP
- HLEN
- HKEYS
- HGET
- HMGET
- HGETALL
- HINCRBY
- HSET
- HMSET
- HSETNX
We use redis-benchmark (shipped with Redis) as our go to benchmark tool. To benchmark, simply run:
bash script/bench.sh
The test suite simulates 100 clients, each makes 100000 requests. Under the hood, we run this:
redis-benchmark -h localhost -p <port> -c 100 -n 100000 -k 1 -t <commands> --csv
Command | redis (op/s) | tiny_redis (op/s) | Comparison |
---|---|---|---|
GET | 89445.44 | 58038.3 | ❌ -35.11% |
SET | 87260.03 | 54614.96 | ❌ -37.41% |
INCR | 88888.89 | 57870.37 | ❌ -34.90% |
LPOP | 80710.25 | 59772.86 | ❌ -25.94% |
RPOP | 86430.43 | 52576.24 | ❌ -39.17% |
LPUSH | 93896.71 | 61012.81 | ❌ -35.02% |
RPUSH | 91157.7 | 62656.64 | ❌ -31.27% |