Redis的基准是实用程序运行n个命令检查Redis 的性能。
语法
redis的基准的基本语法如下所示:
redis-benchmark [option] [option value]
|
例子
下面给出的例子调用100000命令检查redis。
redis-benchmark -n 100000
PING_INLINE: 141043.72 requests per second PING_BULK: 142857.14 requests per second SET: 141442.72 requests per second GET: 145348.83 requests per second INCR: 137362.64 requests per second LPUSH: 145348.83 requests per second LPOP: 146198.83 requests per second SADD: 146198.83 requests per second SPOP: 149253.73 requests per second LPUSH (needed to benchmark LRANGE): 148588.42 requests per second LRANGE_100 (first 100 elements): 58411.21 requests per second LRANGE_300 (first 300 elements): 21195.42 requests per second LRANGE_500 (first 450 elements): 14539.11 requests per second LRANGE_600 (first 600 elements): 10504.20 requests per second MSET (10 keys): 93283.58 requests per second
|
Redis的基准有许多可供选择,分列如下:
例子
下面给出的例子显示了多个使用的Redis基准工具选项。
redis-benchmark -h 127.0.0.1 -p 6379 -t set,lpush -n 100000 -q SET: 146198.83 requests per second LPUSH: 145560.41 requests per second
|
|
830 次浏览 |
34次 |
|
捐助 |
|
|