Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
607c594a
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
607c594a
编写于
6月 26, 2017
作者:
T
Tushar Dadlani
提交者:
Marbin Tan
6月 28, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gpperfmon: refactor quantum name to be more explicit
Signed-off-by:
N
Marbin Tan
<
mtan@pivotal.io
>
上级
411d3c82
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
14 deletion
+14
-14
gpAux/gpperfmon/src/gpmon/gpmmon.c
gpAux/gpperfmon/src/gpmon/gpmmon.c
+13
-13
gpAux/gpperfmon/src/gpmon/gpmonlib.h
gpAux/gpperfmon/src/gpmon/gpmonlib.h
+1
-1
未找到文件。
gpAux/gpperfmon/src/gpmon/gpmmon.c
浏览文件 @
607c594a
...
...
@@ -88,7 +88,7 @@ apr_thread_mutex_t *logfile_mutex = NULL;
/* Default option values */
int
verbose
=
0
;
/* == opt.v */
int
very_verbose
=
0
;
/* == opt.V */
int
quantum
=
15
;
/* == opt.q */
int
quantum
=
15
;
/* == opt.q
uantum
*/
int
min_query_time
=
60
;
/* == opt.m */
/* thread handles */
...
...
@@ -134,7 +134,7 @@ void update_mmonlog_filename()
/** Gets quantum */
int
gpmmon_quantum
(
void
)
{
return
opt
.
q
;
return
opt
.
q
uantum
;
}
/* prints usage and exit */
...
...
@@ -881,7 +881,7 @@ static void* message_main(apr_thread_t* thread_, void* arg_)
time_t
compute_next_dump_to_file
()
{
time_t
current_time
=
time
(
NULL
);
return
(
current_time
-
(
current_time
%
opt
.
q
)
+
opt
.
q
);
return
(
current_time
-
(
current_time
%
opt
.
q
uantum
)
+
opt
.
quantum
);
}
static
void
gpmmon_main
(
void
)
...
...
@@ -894,8 +894,8 @@ static void gpmmon_main(void)
int
ticks_since_last_log_check
=
0
;
const
unsigned
int
log_check_interval
=
60
;
const
int
safety_ticks
=
2
*
opt
.
q
;
unsigned
int
dump_request_time_allowance
=
opt
.
q
/
2
;
const
int
safety_ticks
=
2
*
opt
.
q
uantum
;
unsigned
int
dump_request_time_allowance
=
opt
.
q
uantum
/
2
;
/* DUMP TO FILE */
time_t
next_dump_to_file_ts
;
...
...
@@ -1062,7 +1062,7 @@ static void gpmmon_main(void)
}
send_msg_safety_ticks
=
safety_ticks
;
next_send_msg_ts
=
this_cycle_ts
+
opt
.
q
;
next_send_msg_ts
=
this_cycle_ts
+
opt
.
q
uantum
;
}
/* DUMP TO FILE */
...
...
@@ -1135,7 +1135,7 @@ static int read_conf_file(char *conffile)
FILE
*
fp
=
fopen
(
conffile
,
"r"
);
int
section
=
0
,
section_found
=
0
;
opt
.
q
=
quantum
;
opt
.
q
uantum
=
quantum
;
opt
.
min_query_time
=
min_query_time
;
opt
.
harvest_interval
=
120
;
opt
.
max_log_size
=
0
;
...
...
@@ -1188,7 +1188,7 @@ static int read_conf_file(char *conffile)
if
(
apr_strnatcasecmp
(
pName
,
"quantum"
)
==
0
)
{
opt
.
q
=
atoi
(
pVal
);
opt
.
q
uantum
=
atoi
(
pVal
);
}
else
if
(
apr_strnatcasecmp
(
pName
,
"harvest_interval"
)
==
0
)
{
...
...
@@ -1285,19 +1285,19 @@ static int read_conf_file(char *conffile)
}
}
smon_terminate_timeout
=
opt
.
q
*
smon_terminate_safe_factor
;
recv_timeout
=
opt
.
q
*
recv_timeout_factor
;
smon_terminate_timeout
=
opt
.
q
uantum
*
smon_terminate_safe_factor
;
recv_timeout
=
opt
.
q
uantum
*
recv_timeout_factor
;
/* check for valid entries */
if
(
!
section_found
)
fprintf
(
stderr
,
"Performance Monitor - Failed to find [gpmmon] section in the "
"configuration file. Using default values
\n
"
);
if
(
opt
.
q
!=
10
&&
opt
.
q
!=
15
&&
opt
.
q
!=
20
&&
opt
.
q
!=
30
&&
opt
.
q
!=
60
)
if
(
opt
.
q
uantum
!=
10
&&
opt
.
quantum
!=
15
&&
opt
.
quantum
!=
20
&&
opt
.
quantum
!=
30
&&
opt
.
quantum
!=
60
)
{
fprintf
(
stderr
,
"Performance Monitor - quantum value must be be either 10, 15, 20, 30 or 60. Using "
"default value of 15
\n
"
);
opt
.
q
=
15
;
opt
.
q
uantum
=
15
;
}
if
(
opt
.
min_query_time
<
0
)
...
...
@@ -1361,7 +1361,7 @@ static int read_conf_file(char *conffile)
verbose
=
opt
.
v
;
min_query_time
=
opt
.
min_query_time
;
quantum
=
opt
.
q
;
quantum
=
opt
.
q
uantum
;
fclose
(
fp
);
return
0
;
...
...
gpAux/gpperfmon/src/gpmon/gpmonlib.h
浏览文件 @
607c594a
...
...
@@ -126,7 +126,7 @@ typedef struct mmon_options_t
apr_uint64_t
max_log_size
;
int
max_fd
;
/* this is the max fd value we ever seen */
int
v
;
int
q
;
int
q
uantum
;
int
min_query_time
;
int
qamode
;
int
harvest_interval
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录