延迟图

用法
LATENCY GRAPH event
复杂度
O(1)
起始版本
2.8.13
ACL 类别
@admin, @dangerous, @slow

为指定事件生成 ASCII 艺术风格的图形。

LATENCY GRAPH 命令可通过最先进的可视化方式,让您直观地了解 event 的延迟趋势。它可用于在诉诸于解析 LATENCY HISTORY 的原始数据或使用外部工具等手段之前,快速掌握情况。

event 的有效值有:

  • active-defrag-cycle
  • aof-fsync-always
  • aof-stat
  • aof-rewrite-diff-write
  • aof-rename
  • aof-write
  • aof-write-active-child
  • aof-write-alone
  • aof-write-pending-fsync
  • command
  • expire-cycle
  • eviction-cycle
  • eviction-del
  • fast-command
  • fork
  • rdb-unlink-temp-file

示例

127.0.0.1:6379> latency reset command
(integer) 0
127.0.0.1:6379> debug sleep .1
OK
127.0.0.1:6379> debug sleep .2
OK
127.0.0.1:6379> debug sleep .3
OK
127.0.0.1:6379> debug sleep .5
OK
127.0.0.1:6379> debug sleep .4
OK
127.0.0.1:6379> latency graph command
command - high 500 ms, low 101 ms (all time high 500 ms)
--------------------------------------------------------------------------------
   #_
  _||
 _|||
_||||

11186
542ss
sss

每个图表列下的垂直标签表示事件发生的时间,可以是几秒、几分钟、几小时或几天前。例如,“15s”表示第一个图表事件发生在 15 秒前。

图表按最小-最大刻度进行归一化,其中零值(底行中的下划线)表示最小值,高行中的 # 表示最大值。

欲了解更多信息,请参阅延迟监控框架页面

RESP2/RESP3 回复

批量字符串回复:延迟图