Skip to content

Latest commit

 

History

History
70 lines (61 loc) · 1.47 KB

README.md

File metadata and controls

70 lines (61 loc) · 1.47 KB

What is this project?

This project serves as Rust learning materials.

Support commands

  1. Generic commands
  • DEL
  • EXPIRE
  • TTL
  • EXISTS
  • FLUSH
  1. String commands
  • GET
  • SET
  • SETNX
  • MGET
  • MSET
  • GETSET
  • GETDEL
  • INCR
  • DECR
  • INCRBY
  • DECRBY
  1. List commands
  • LPOP
  • RPOP
  • LPUSH
  • RPUSH
  • LLEN
  • LRANGE
  • LREM
  • LSET
  • LTRIM
  • BLPOP
  • BRPOP
  1. Hash commands
  • HLEN
  • HKEYS
  • HGET
  • HMGET
  • HGETALL
  • HINCRBY
  • HSET
  • HMSET
  • HSETNX

Benchmark

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%