Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Incubator Pegasus
提交
85524441
Incubator Pegasus
项目概览
apache
/
Incubator Pegasus
通知
9
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Incubator Pegasus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
85524441
编写于
12月 05, 2019
作者:
S
Shuo
提交者:
Yingchun Lai
12月 30, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(collector): add statistics for estimate key number of table (#437)
上级
06d922fb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
0 deletion
+7
-0
src/server/info_collector.cpp
src/server/info_collector.cpp
+3
-0
src/server/info_collector.h
src/server/info_collector.h
+1
-0
src/shell/command_helper.h
src/shell/command_helper.h
+3
-0
未找到文件。
src/server/info_collector.cpp
浏览文件 @
85524441
...
...
@@ -167,6 +167,7 @@ void info_collector::on_app_stat()
all
.
rdb_block_cache_total_count
+=
row
.
rdb_block_cache_total_count
;
all
.
rdb_index_and_filter_blocks_mem_usage
+=
row
.
rdb_index_and_filter_blocks_mem_usage
;
all
.
rdb_memtable_mem_usage
+=
row
.
rdb_memtable_mem_usage
;
all
.
rdb_estimate_num_keys
+=
row
.
rdb_estimate_num_keys
;
read_qps
[
i
]
=
row
.
get_qps
+
row
.
multi_get_qps
+
row
.
scan_qps
;
write_qps
[
i
]
=
row
.
put_qps
+
row
.
multi_put_qps
+
row
.
remove_qps
+
row
.
multi_remove_qps
+
row
.
incr_qps
+
row
.
check_and_set_qps
+
row
.
check_and_mutate_qps
;
...
...
@@ -205,6 +206,7 @@ void info_collector::on_app_stat()
counters
->
rdb_index_and_filter_blocks_mem_usage
->
set
(
row
.
rdb_index_and_filter_blocks_mem_usage
);
counters
->
rdb_memtable_mem_usage
->
set
(
row
.
rdb_memtable_mem_usage
);
counters
->
rdb_estimate_num_keys
->
set
(
row
.
rdb_estimate_num_keys
);
counters
->
read_qps
->
set
(
read_qps
[
i
]);
counters
->
write_qps
->
set
(
write_qps
[
i
]);
}
...
...
@@ -255,6 +257,7 @@ info_collector::AppStatCounters *info_collector::get_app_counters(const std::str
INIT_COUNTER
(
rdb_block_cache_hit_rate
);
INIT_COUNTER
(
rdb_index_and_filter_blocks_mem_usage
);
INIT_COUNTER
(
rdb_memtable_mem_usage
);
INIT_COUNTER
(
rdb_estimate_num_keys
);
INIT_COUNTER
(
read_qps
);
INIT_COUNTER
(
write_qps
);
_app_stat_counters
[
app_name
]
=
counters
;
...
...
src/server/info_collector.h
浏览文件 @
85524441
...
...
@@ -53,6 +53,7 @@ public:
::
dsn
::
perf_counter_wrapper
rdb_block_cache_mem_usage
;
::
dsn
::
perf_counter_wrapper
rdb_index_and_filter_blocks_mem_usage
;
::
dsn
::
perf_counter_wrapper
rdb_memtable_mem_usage
;
::
dsn
::
perf_counter_wrapper
rdb_estimate_num_keys
;
::
dsn
::
perf_counter_wrapper
read_qps
;
::
dsn
::
perf_counter_wrapper
write_qps
;
};
...
...
src/shell/command_helper.h
浏览文件 @
85524441
...
...
@@ -538,6 +538,7 @@ struct row_data
double
rdb_block_cache_total_count
=
0
;
double
rdb_index_and_filter_blocks_mem_usage
=
0
;
double
rdb_memtable_mem_usage
=
0
;
double
rdb_estimate_num_keys
=
0
;
};
inline
bool
...
...
@@ -589,6 +590,8 @@ update_app_pegasus_perf_counter(row_data &row, const std::string &counter_name,
row
.
rdb_index_and_filter_blocks_mem_usage
+=
value
;
else
if
(
counter_name
==
"rdb.memtable.memory_usage"
)
row
.
rdb_memtable_mem_usage
+=
value
;
else
if
(
counter_name
==
"rdb.estimate_num_keys"
)
row
.
rdb_estimate_num_keys
+=
value
;
else
return
false
;
return
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录