redis-cli 下令提供了–intrinsic-latency 选项,用来监测和统计测试期间内的最大耽误(以毫秒为单元),这个耽误可以作为 Redis 的基线性能。
redis-cli --latency -h `host` -p `port`好比实行如下指令:
redis-cli --intrinsic-latency 100Max latency so far: 4 microseconds.Max latency so far: 18 microseconds.Max latency so far: 41 microseconds.Max latency so far: 57 microseconds.Max latency so far: 78 microseconds.Max latency so far: 170 microseconds.Max latency so far: 342 microseconds.Max latency so far: 3079 microseconds.45026981 total runs (avg latency: 2.2209 microseconds / 2220.89 nanoseconds per run).Worst run took 1386x longer than the average latency.