Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
edc64122
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
edc64122
编写于
2月 22, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: fix coverity issues.
上级
cd1089ac
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
6 deletion
+7
-6
utils/test/c/tmqSim.c
utils/test/c/tmqSim.c
+7
-6
未找到文件。
utils/test/c/tmqSim.c
浏览文件 @
edc64122
...
@@ -400,7 +400,7 @@ TAOS* createNewTaosConnect() {
...
@@ -400,7 +400,7 @@ TAOS* createNewTaosConnect() {
int32_t
retryCnt
=
10
;
int32_t
retryCnt
=
10
;
while
(
retryCnt
--
)
{
while
(
retryCnt
--
)
{
TAOS
*
taos
=
taos_connect
(
NULL
,
"root"
,
"taosdata"
,
NULL
,
0
);
taos
=
taos_connect
(
NULL
,
"root"
,
"taosdata"
,
NULL
,
0
);
if
(
NULL
!=
taos
)
{
if
(
NULL
!=
taos
)
{
return
taos
;
return
taos
;
}
}
...
@@ -780,7 +780,8 @@ void loop_consume(SThreadInfo* pInfo) {
...
@@ -780,7 +780,8 @@ void loop_consume(SThreadInfo* pInfo) {
if
(
pInfo
->
ifCheckData
)
{
if
(
pInfo
->
ifCheckData
)
{
char
filename
[
256
]
=
{
0
};
char
filename
[
256
]
=
{
0
};
char
tmpString
[
128
];
memset
(
tmpString
,
0
,
tListLen
(
tmpString
));
// sprintf(filename, "%s/../log/consumerid_%d_%s.txt", configDir, pInfo->consumerId,
// sprintf(filename, "%s/../log/consumerid_%d_%s.txt", configDir, pInfo->consumerId,
// getCurrentTimeString(tmpString));
// getCurrentTimeString(tmpString));
sprintf
(
filename
,
"%s/../log/consumerid_%d.txt"
,
configDir
,
pInfo
->
consumerId
);
sprintf
(
filename
,
"%s/../log/consumerid_%d.txt"
,
configDir
,
pInfo
->
consumerId
);
...
@@ -834,12 +835,12 @@ void loop_consume(SThreadInfo* pInfo) {
...
@@ -834,12 +835,12 @@ void loop_consume(SThreadInfo* pInfo) {
}
}
if
((
totalRows
>=
pInfo
->
expectMsgCnt
)
||
(
totalMsgs
>=
pInfo
->
expectMsgCnt
))
{
if
((
totalRows
>=
pInfo
->
expectMsgCnt
)
||
(
totalMsgs
>=
pInfo
->
expectMsgCnt
))
{
char
tmpString
[
128
]
;
memset
(
tmpString
,
0
,
tListLen
(
tmpString
))
;
taosFprintfFile
(
g_fp
,
"%s over than expect rows, so break consume
\n
"
,
getCurrentTimeString
(
tmpString
));
taosFprintfFile
(
g_fp
,
"%s over than expect rows, so break consume
\n
"
,
getCurrentTimeString
(
tmpString
));
break
;
break
;
}
}
}
else
{
}
else
{
char
tmpString
[
128
]
;
memset
(
tmpString
,
0
,
tListLen
(
tmpString
))
;
taosFprintfFile
(
g_fp
,
"%s no poll more msg when time over, break consume
\n
"
,
getCurrentTimeString
(
tmpString
));
taosFprintfFile
(
g_fp
,
"%s no poll more msg when time over, break consume
\n
"
,
getCurrentTimeString
(
tmpString
));
break
;
break
;
}
}
...
@@ -1113,7 +1114,7 @@ void omb_loop_consume(SThreadInfo* pInfo) {
...
@@ -1113,7 +1114,7 @@ void omb_loop_consume(SThreadInfo* pInfo) {
lastTotalLenOfMsg
=
totalLenOfMsg
;
lastTotalLenOfMsg
=
totalLenOfMsg
;
}
}
}
else
{
}
else
{
char
tmpString
[
128
]
;
memset
(
tmpString
,
0
,
tListLen
(
tmpString
))
;
taosFprintfFile
(
g_fp
,
"%s no poll more msg when time over, break consume
\n
"
,
getCurrentTimeString
(
tmpString
));
taosFprintfFile
(
g_fp
,
"%s no poll more msg when time over, break consume
\n
"
,
getCurrentTimeString
(
tmpString
));
printf
(
"%s no poll more msg when time over, break consume
\n
"
,
getCurrentTimeString
(
tmpString
));
printf
(
"%s no poll more msg when time over, break consume
\n
"
,
getCurrentTimeString
(
tmpString
));
int64_t
currentPrintTime
=
taosGetTimestampMs
();
int64_t
currentPrintTime
=
taosGetTimestampMs
();
...
@@ -1381,7 +1382,7 @@ void startOmbConsume() {
...
@@ -1381,7 +1382,7 @@ void startOmbConsume() {
printf
(
"SQL: %s
\n
"
,
sql
);
printf
(
"SQL: %s
\n
"
,
sql
);
queryDbExec
(
taos
,
sql
,
NO_INSERT_TYPE
);
queryDbExec
(
taos
,
sql
,
NO_INSERT_TYPE
);
int32_t
producerRate
=
ceil
(
g_stConfInfo
.
producerRate
/
g_stConfInfo
.
producers
);
int32_t
producerRate
=
ceil
(
((
double
)
g_stConfInfo
.
producerRate
)
/
g_stConfInfo
.
producers
);
printf
(
"==== create %d produce thread ====
\n
"
,
g_stConfInfo
.
producers
);
printf
(
"==== create %d produce thread ====
\n
"
,
g_stConfInfo
.
producers
);
for
(
int32_t
i
=
0
;
i
<
g_stConfInfo
.
producers
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
g_stConfInfo
.
producers
;
++
i
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录