LATENCY GRAPH

返回事件的延迟图。

语法

LATENCY GRAPH event

引入版本:2.8.13

复杂度摘要:O(1)

为指定事件生成 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

必需参数

event

绘制延迟事件。

示例

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 秒前。

该图以最小-最大比例进行归一化,以便零(下行中的下划线)是最小值,而上行中的 # 是最大值。

有关详细信息,请参阅 延迟监控框架页面。

Redis Software 与 Redis Cloud 兼容性

Redis
软件
Redis
Cloud
说明
❌ 标准
❌主动-主动
❌ 标准
❌主动-主动

返回值

RESP2

批量字符串回复:延迟图

RESP3

批量字符串回复:延迟图

资料来源:Redis 官方 LATENCY GRAPH 文档;中文内容参考 Redis 文档许可。