Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
81bc5722
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
未验证
提交
81bc5722
编写于
7月 15, 2021
作者:
sangshuduo
提交者:
GitHub
7月 15, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-5300]<fix>: taosdemo stmt debug print. (#6873)
* [TD-5300]<fix>: taosdemo stmt debug print. * fix default iface is unknown.
上级
d7a54166
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
10 deletion
+24
-10
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+24
-10
未找到文件。
src/kit/taosdemo/taosdemo.c
浏览文件 @
81bc5722
...
...
@@ -569,7 +569,7 @@ SArguments g_args = {
0
,
// test_mode
"127.0.0.1"
,
// host
6030
,
// port
TAOSC_IFACE
,
// iface
INTERFACE_BUT
,
// iface
"root"
,
// user
#ifdef _TD_POWER_
"powerdb"
,
// password
...
...
@@ -1429,8 +1429,13 @@ static int printfInsertMeta() {
else
printf
(
"
\n
taosdemo is simulating random data as you request..
\n\n
"
);
printf
(
"interface:
\033
[33m%s
\033
[0m
\n
"
,
(
g_args
.
iface
==
TAOSC_IFACE
)
?
"taosc"
:
(
g_args
.
iface
==
REST_IFACE
)
?
"rest"
:
"stmt"
);
if
(
g_args
.
iface
!=
INTERFACE_BUT
)
{
// first time if no iface specified
printf
(
"interface:
\033
[33m%s
\033
[0m
\n
"
,
(
g_args
.
iface
==
TAOSC_IFACE
)
?
"taosc"
:
(
g_args
.
iface
==
REST_IFACE
)
?
"rest"
:
"stmt"
);
}
printf
(
"host:
\033
[33m%s:%u
\033
[0m
\n
"
,
g_Dbs
.
host
,
g_Dbs
.
port
);
printf
(
"user:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
user
);
...
...
@@ -5038,13 +5043,17 @@ static int32_t execInsert(threadInfo *pThreadInfo, uint32_t k)
uint16_t
iface
;
if
(
superTblInfo
)
iface
=
superTblInfo
->
iface
;
else
iface
=
g_args
.
iface
;
else
{
if
(
g_args
.
iface
==
INTERFACE_BUT
)
iface
=
TAOSC_IFACE
;
else
iface
=
g_args
.
iface
;
}
debugPrint
(
"[%d] %s() LN%d %s
\n
"
,
pThreadInfo
->
threadID
,
__func__
,
__LINE__
,
(
g_args
.
iface
==
TAOSC_IFACE
)
?
"taosc"
:
(
g_args
.
iface
==
REST_IFACE
)
?
"rest"
:
"stmt"
);
(
iface
==
TAOSC_IFACE
)
?
"taosc"
:
(
iface
==
REST_IFACE
)
?
"rest"
:
"stmt"
);
switch
(
iface
)
{
case
TAOSC_IFACE
:
...
...
@@ -5884,7 +5893,7 @@ static void printStatPerThread(threadInfo *pThreadInfo)
pThreadInfo
->
threadID
,
pThreadInfo
->
totalInsertRows
,
pThreadInfo
->
totalAffectedRows
,
(
double
)(
pThreadInfo
->
totalAffectedRows
/
(
pThreadInfo
->
totalDelay
/
1000
.
0
))
);
(
pThreadInfo
->
totalDelay
)
?
(
double
)((
pThreadInfo
->
totalAffectedRows
/
(
pThreadInfo
->
totalDelay
)
/
1000
.
0
))
:
FLT_MAX
);
}
// sync write interlace data
...
...
@@ -6463,7 +6472,7 @@ static int convertHostToServAddr(char *host, uint16_t port, struct sockaddr_in *
}
static
void
startMultiThreadInsertData
(
int
threads
,
char
*
db_name
,
char
*
precision
,
SSuperTable
*
superTblInfo
)
{
char
*
precision
,
SSuperTable
*
superTblInfo
)
{
int32_t
timePrec
=
TSDB_TIME_PRECISION_MILLI
;
if
(
0
!=
precision
[
0
])
{
...
...
@@ -7936,7 +7945,12 @@ static void setParaFromArg(){
tstrncpy
(
g_Dbs
.
db
[
0
].
superTbls
[
0
].
childTblPrefix
,
g_args
.
tb_prefix
,
TSDB_TABLE_NAME_LEN
-
20
);
tstrncpy
(
g_Dbs
.
db
[
0
].
superTbls
[
0
].
dataSource
,
"rand"
,
MAX_TB_NAME_SIZE
);
g_Dbs
.
db
[
0
].
superTbls
[
0
].
iface
=
g_args
.
iface
;
if
(
g_args
.
iface
==
INTERFACE_BUT
)
{
g_Dbs
.
db
[
0
].
superTbls
[
0
].
iface
=
TAOSC_IFACE
;
}
else
{
g_Dbs
.
db
[
0
].
superTbls
[
0
].
iface
=
g_args
.
iface
;
}
tstrncpy
(
g_Dbs
.
db
[
0
].
superTbls
[
0
].
startTimestamp
,
"2017-07-14 10:40:00.000"
,
MAX_TB_NAME_SIZE
);
g_Dbs
.
db
[
0
].
superTbls
[
0
].
timeStampStep
=
DEFAULT_TIMESTAMP_STEP
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录