Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
hanoi2005
redis
提交
53eeeaff
R
redis
项目概览
hanoi2005
/
redis
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
53eeeaff
编写于
10月 15, 2010
作者:
A
antirez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added keyspace_hits and keyspace_misses fields in INFO output
上级
a3687929
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
5 deletion
+15
-5
src/db.c
src/db.c
+2
-0
src/redis.c
src/redis.c
+6
-0
src/redis.h
src/redis.h
+7
-5
未找到文件。
src/db.c
浏览文件 @
53eeeaff
...
...
@@ -34,8 +34,10 @@ robj *lookupKey(redisDb *db, robj *key) {
if
(
notify
)
handleClientsBlockedOnSwappedKey
(
db
,
key
);
}
}
server
.
stat_keyspace_hits
++
;
return
val
;
}
else
{
server
.
stat_keyspace_misses
++
;
return
NULL
;
}
}
...
...
src/redis.c
浏览文件 @
53eeeaff
...
...
@@ -823,6 +823,8 @@ void initServer() {
server
.
stat_numconnections
=
0
;
server
.
stat_expiredkeys
=
0
;
server
.
stat_starttime
=
time
(
NULL
);
server
.
stat_keyspace_misses
=
0
;
server
.
stat_keyspace_hits
=
0
;
server
.
unixtime
=
time
(
NULL
);
aeCreateTimeEvent
(
server
.
el
,
1
,
serverCron
,
NULL
,
NULL
);
if
(
aeCreateFileEvent
(
server
.
el
,
server
.
fd
,
AE_READABLE
,
...
...
@@ -1190,6 +1192,8 @@ sds genRedisInfoString(void) {
"total_connections_received:%lld
\r\n
"
"total_commands_processed:%lld
\r\n
"
"expired_keys:%lld
\r\n
"
"keyspace_hits:%lld
\r\n
"
"keyspace_misses:%lld
\r\n
"
"hash_max_zipmap_entries:%zu
\r\n
"
"hash_max_zipmap_value:%zu
\r\n
"
"pubsub_channels:%ld
\r\n
"
...
...
@@ -1222,6 +1226,8 @@ sds genRedisInfoString(void) {
server
.
stat_numconnections
,
server
.
stat_numcommands
,
server
.
stat_expiredkeys
,
server
.
stat_keyspace_hits
,
server
.
stat_keyspace_misses
,
server
.
hash_max_zipmap_entries
,
server
.
hash_max_zipmap_value
,
dictSize
(
server
.
pubsub_channels
),
...
...
src/redis.h
浏览文件 @
53eeeaff
...
...
@@ -357,12 +357,14 @@ struct redisServer {
aeEventLoop
*
el
;
int
cronloops
;
/* number of times the cron function run */
list
*
objfreelist
;
/* A list of freed objects to avoid malloc() */
time_t
lastsave
;
/* Unix time of last save succeeede */
time_t
lastsave
;
/* Unix time of last save succeeede */
/* Fields used only for stats */
time_t
stat_starttime
;
/* server start time */
long
long
stat_numcommands
;
/* number of processed commands */
long
long
stat_numconnections
;
/* number of connections received */
long
long
stat_expiredkeys
;
/* number of expired keys */
time_t
stat_starttime
;
/* server start time */
long
long
stat_numcommands
;
/* number of processed commands */
long
long
stat_numconnections
;
/* number of connections received */
long
long
stat_expiredkeys
;
/* number of expired keys */
long
long
stat_keyspace_hits
;
/* number of successful lookups of keys */
long
long
stat_keyspace_misses
;
/* number of failed lookups of keys */
/* Configuration */
int
verbosity
;
int
glueoutputbuf
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录