redis独立模块-慢查询日志

数据结构

1
2
3
4
5
6
7
8
/* This structure defines an entry inside the slow log list */
typedef struct slowlogEntry {
robj **argv;
int argc;
long long id; /* Unique entry identifier. */
long long duration; /* Time spent by the query, in nanoseconds. */
time_t time; /* Unix time at which the query was executed. */
} slowlogEntry;

特点

  • 超过阈值时长的操作会被记录(不写入硬盘)
  • 仅记录最近N(配置)条记录
-------------本文结束 感谢阅读-------------