Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cc97d60f
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看板
提交
cc97d60f
编写于
12月 26, 2020
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/TD-2354
上级
6b8b293c
960e8c03
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
122 addition
and
24 deletion
+122
-24
Jenkinsfile
Jenkinsfile
+14
-3
packaging/tools/set_core.sh
packaging/tools/set_core.sh
+1
-1
src/common/src/tglobal.c
src/common/src/tglobal.c
+2
-2
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+87
-9
src/util/src/tlog.c
src/util/src/tlog.c
+1
-1
tests/pytest/pytest_1.sh
tests/pytest/pytest_1.sh
+14
-6
tests/pytest/pytest_2.sh
tests/pytest/pytest_2.sh
+1
-0
tests/test-all.sh
tests/test-all.sh
+2
-2
未找到文件。
Jenkinsfile
浏览文件 @
cc97d60f
...
...
@@ -79,14 +79,25 @@ pipeline {
changeRequest
()
}
parallel
{
stage
(
'python'
)
{
agent
{
label
'p
ytest
'
}
stage
(
'python
_1
'
)
{
agent
{
label
'p
1
'
}
steps
{
pre_test
()
sh
'''
cd ${WKC}/tests
./test-all.sh pytestfq
./test-all.sh p1
date'''
}
}
stage
(
'python_2'
)
{
agent
{
label
'p2'
}
steps
{
pre_test
()
sh
'''
cd ${WKC}/tests
./test-all.sh p2
date'''
}
}
...
...
packaging/tools/set_core.sh
浏览文件 @
cc97d60f
...
...
@@ -9,7 +9,7 @@ GREEN_DARK='\033[0;32m'
GREEN_UNDERLINE
=
'\033[4;32m'
NC
=
'\033[0m'
set
-e
#
set -e
# set -x
corePath
=
$1
...
...
src/common/src/tglobal.c
浏览文件 @
cc97d60f
...
...
@@ -200,8 +200,8 @@ float tsTotalTmpDirGB = 0;
float
tsTotalDataDirGB
=
0
;
float
tsAvailTmpDirectorySpace
=
0
;
float
tsAvailDataDirGB
=
0
;
float
tsReservedTmpDirectorySpace
=
0
.
1
f
;
float
tsMinimalDataDirGB
=
0
.
5
f
;
float
tsReservedTmpDirectorySpace
=
1
.
0
f
;
float
tsMinimalDataDirGB
=
1
.
0
f
;
int32_t
tsTotalMemoryMB
=
0
;
int32_t
tsVersion
=
0
;
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
cc97d60f
...
...
@@ -205,10 +205,10 @@ typedef struct DemoArguments {
arguments
->
tb_prefix
=
arg
;
break
;
case
'M'
:
arguments
->
use_metric
=
fals
e
;
arguments
->
use_metric
=
tru
e
;
break
;
case
'x'
:
arguments
->
insert_only
=
fals
e
;
arguments
->
insert_only
=
tru
e
;
break
;
case
'c'
:
if
(
wordexp
(
arg
,
&
full_path
,
0
)
!=
0
)
{
...
...
@@ -406,9 +406,9 @@ typedef struct DemoArguments {
}
else
if
(
strcmp
(
argv
[
i
],
"-m"
)
==
0
)
{
arguments
->
tb_prefix
=
argv
[
++
i
];
}
else
if
(
strcmp
(
argv
[
i
],
"-M"
)
==
0
)
{
arguments
->
use_metric
=
fals
e
;
arguments
->
use_metric
=
tru
e
;
}
else
if
(
strcmp
(
argv
[
i
],
"-x"
)
==
0
)
{
arguments
->
insert_only
=
fals
e
;
arguments
->
insert_only
=
tru
e
;
}
else
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
{
strcpy
(
configDir
,
argv
[
++
i
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-O"
)
==
0
)
{
...
...
@@ -476,6 +476,14 @@ typedef struct {
int
notFinished
;
tsem_t
lock_sem
;
int
counter
;
// insert delay statitics
int64_t
cntDelay
;
int64_t
totalDelay
;
int64_t
avgDelay
;
int64_t
maxDelay
;
int64_t
minDelay
;
}
info
;
typedef
struct
{
...
...
@@ -575,7 +583,7 @@ int main(int argc, char *argv[]) {
arguments
.
num_of_DPT
=
100000
;
arguments
.
num_of_RPR
=
1000
;
arguments
.
use_metric
=
true
;
arguments
.
insert_only
=
tru
e
;
arguments
.
insert_only
=
fals
e
;
// end change
parse_args
(
argc
,
argv
,
&
arguments
);
...
...
@@ -740,6 +748,9 @@ int main(int argc, char *argv[]) {
pthread_t
*
pids
=
malloc
(
threads
*
sizeof
(
pthread_t
));
info
*
infos
=
malloc
(
threads
*
sizeof
(
info
));
memset
(
pids
,
0
,
threads
*
sizeof
(
pthread_t
));
memset
(
infos
,
0
,
threads
*
sizeof
(
info
));
int
a
=
ntables
/
threads
;
if
(
a
<
1
)
{
threads
=
ntables
;
...
...
@@ -768,6 +779,7 @@ int main(int argc, char *argv[]) {
t_info
->
end_table_id
=
i
<
b
?
last
+
a
:
last
+
a
-
1
;
last
=
t_info
->
end_table_id
+
1
;
t_info
->
counter
=
0
;
t_info
->
minDelay
=
INT16_MAX
;
tsem_init
(
&
(
t_info
->
mutex_sem
),
0
,
1
);
t_info
->
notFinished
=
t_info
->
end_table_id
-
t_info
->
start_table_id
+
1
;
...
...
@@ -799,12 +811,29 @@ int main(int argc, char *argv[]) {
t
,
(
int64_t
)
ntables
*
nrecords_per_table
,
nrecords_per_request
,
(
int64_t
)
ntables
*
nrecords_per_table
/
t
);
int64_t
totalDelay
=
0
;
int64_t
maxDelay
=
0
;
int64_t
minDelay
=
INT16_MAX
;
int64_t
cntDelay
=
0
;
double
avgDelay
=
0
;
for
(
int
i
=
0
;
i
<
threads
;
i
++
)
{
info
*
t_info
=
infos
+
i
;
taos_close
(
t_info
->
taos
);
tsem_destroy
(
&
(
t_info
->
mutex_sem
));
tsem_destroy
(
&
(
t_info
->
lock_sem
));
totalDelay
+=
t_info
->
totalDelay
;
cntDelay
+=
t_info
->
cntDelay
;
if
(
t_info
->
maxDelay
>
maxDelay
)
maxDelay
=
t_info
->
maxDelay
;
if
(
t_info
->
minDelay
<
minDelay
)
minDelay
=
t_info
->
minDelay
;
}
avgDelay
=
(
double
)
totalDelay
/
cntDelay
;
fprintf
(
fp
,
"insert delay, avg:%10.6fms, max: %10.6fms, min: %10.6fms
\n\n
"
,
avgDelay
/
1000
.
0
,
(
double
)
maxDelay
/
1000
.
0
,
(
double
)
minDelay
/
1000
.
0
);
printf
(
"insert delay, avg: %10.6fms, max: %10.6fms, min: %10.6fms
\n\n
"
,
avgDelay
/
1000
.
0
,
(
double
)
maxDelay
/
1000
.
0
,
(
double
)
minDelay
/
1000
.
0
);
free
(
pids
);
free
(
infos
);
...
...
@@ -859,7 +888,7 @@ int main(int argc, char *argv[]) {
}
if
(
!
insert_only
)
{
if
(
false
==
insert_only
)
{
// query data
pthread_t
read_id
;
info
*
rInfo
=
malloc
(
sizeof
(
info
));
...
...
@@ -998,7 +1027,7 @@ void * createTable(void *sarg)
/* Create all the tables; */
printf
(
"Creating table from %d to %d
\n
"
,
winfo
->
start_table_id
,
winfo
->
end_table_id
);
for
(
int
i
=
winfo
->
start_table_id
;
i
<=
winfo
->
end_table_id
;
i
++
)
{
snprintf
(
command
,
BUFFER_SIZE
,
"create table if not exists %s.%s%d (ts timestamp%s;"
,
winfo
->
db_name
,
winfo
->
tb_prefix
,
i
,
winfo
->
cols
);
snprintf
(
command
,
BUFFER_SIZE
,
"create table if not exists %s.%s%d (ts timestamp%s
)
;"
,
winfo
->
db_name
,
winfo
->
tb_prefix
,
i
,
winfo
->
cols
);
queryDB
(
winfo
->
taos
,
command
);
}
}
else
{
...
...
@@ -1204,6 +1233,41 @@ void *readMetric(void *sarg) {
return
NULL
;
}
static
int
queryDbExec
(
TAOS
*
taos
,
char
*
command
,
int
type
)
{
int
i
;
TAOS_RES
*
res
=
NULL
;
int32_t
code
=
-
1
;
for
(
i
=
0
;
i
<
5
;
i
++
)
{
if
(
NULL
!=
res
)
{
taos_free_result
(
res
);
res
=
NULL
;
}
res
=
taos_query
(
taos
,
command
);
code
=
taos_errno
(
res
);
if
(
0
==
code
)
{
break
;
}
}
if
(
code
!=
0
)
{
fprintf
(
stderr
,
"Failed to run %s, reason: %s
\n
"
,
command
,
taos_errstr
(
res
));
taos_free_result
(
res
);
//taos_close(taos);
return
-
1
;
}
if
(
1
==
type
)
{
int
affectedRows
=
taos_affected_rows
(
res
);
taos_free_result
(
res
);
return
affectedRows
;
}
taos_free_result
(
res
);
return
0
;
}
void
queryDB
(
TAOS
*
taos
,
char
*
command
)
{
int
i
;
TAOS_RES
*
pSql
=
NULL
;
...
...
@@ -1273,7 +1337,21 @@ void *syncWrite(void *sarg) {
}
/* puts(buffer); */
queryDB
(
winfo
->
taos
,
buffer
);
int64_t
startTs
;
int64_t
endTs
;
startTs
=
taosGetTimestampUs
();
//queryDB(winfo->taos, buffer);
int
affectedRows
=
queryDbExec
(
winfo
->
taos
,
buffer
,
1
);
if
(
0
<=
affectedRows
){
endTs
=
taosGetTimestampUs
();
int64_t
delay
=
endTs
-
startTs
;
if
(
delay
>
winfo
->
maxDelay
)
winfo
->
maxDelay
=
delay
;
if
(
delay
<
winfo
->
minDelay
)
winfo
->
minDelay
=
delay
;
winfo
->
cntDelay
++
;
winfo
->
totalDelay
+=
delay
;
//winfo->avgDelay = (double)winfo->totalDelay / winfo->cntDelay;
}
if
(
tID
==
winfo
->
end_table_id
)
{
i
=
inserted
;
...
...
src/util/src/tlog.c
浏览文件 @
cc97d60f
...
...
@@ -67,7 +67,7 @@ int32_t tsLogKeepDays = 0;
int32_t
tsAsyncLog
=
1
;
float
tsTotalLogDirGB
=
0
;
float
tsAvailLogDirGB
=
0
;
float
tsMinimalLogDirGB
=
0
.
1
f
;
float
tsMinimalLogDirGB
=
1
.
0
f
;
#ifdef _TD_POWER_
char
tsLogDir
[
TSDB_FILENAME_LEN
]
=
"/var/log/power"
;
#else
...
...
tests/pytest/pytest_1.sh
浏览文件 @
cc97d60f
...
...
@@ -19,7 +19,8 @@ python3 ./test.py -f insert/randomNullCommit.py
python3 insert/retentionpolicy.py
python3 ./test.py
-f
insert/alterTableAndInsert.py
python3 ./test.py
-f
insert/insertIntoTwoTables.py
python3 ./test.py
-f
query/isNullTest.py
#python3 ./test.py -f insert/before_1970.py
python3 bug2265.py
#table
python3 ./test.py
-f
table/alter_wal0.py
...
...
@@ -33,7 +34,7 @@ python3 ./test.py -f table/alter_column.py
python3 ./test.py
-f
table/boundary.py
python3 ./test.py
-f
table/create.py
python3 ./test.py
-f
table/del_stable.py
python3 ./test.py
-f
table/queryWithTaosdKilled.py
# tag
python3 ./test.py
-f
tag_lite/filter.py
...
...
@@ -164,9 +165,15 @@ python3 ./test.py -f query/bug1874.py
python3 ./test.py
-f
query/bug1875.py
python3 ./test.py
-f
query/bug1876.py
python3 ./test.py
-f
query/bug2218.py
python3 ./test.py
-f
query/bug2117.py
python3 ./test.py
-f
query/bug2118.py
python3 ./test.py
-f
query/bug2143.py
python3 ./test.py
-f
query/sliding.py
python3 ./test.py
-f
query/unionAllTest.py
python3 ./test.py
-f
query/bug2281.py
python3 ./test.py
-f
query/bug2119.py
python3 bug2265.py
python3 ./test.py
-f
query/isNullTest.py
python3 ./test.py
-f
query/queryWithTaosdKilled.py
python3 ./test.py
-f
query/floatCompare.py
#stream
...
...
@@ -184,6 +191,7 @@ python3 ./test.py -f alter/alter_table_crash.py
python3 ./test.py
-f
client/client.py
python3 ./test.py
-f
client/version.py
python3 ./test.py
-f
client/alterDatabase.py
python3 ./test.py
-f
client/noConnectionErrorTest.py
# Misc
python3 testCompress.py
...
...
@@ -207,7 +215,7 @@ python3 ./test.py -f functions/function_spread.py -r 1
python3 ./test.py
-f
functions/function_stddev.py
-r
1
python3 ./test.py
-f
functions/function_sum.py
-r
1
python3 ./test.py
-f
functions/function_top.py
-r
1
#
python3 ./test.py -f functions/function_twa.py -r 1
python3 ./test.py
-f
functions/function_twa.py
-r
1
python3 ./test.py
-f
functions/function_twa_test2.py
python3 queryCount.py
python3 ./test.py
-f
query/queryGroupbyWithInterval.py
...
...
@@ -219,10 +227,10 @@ python3 test.py -f query/queryFillTest.py
python3 test.py
-f
tools/taosdemoTest.py
python3 test.py
-f
tools/taosdumpTest.py
python3 test.py
-f
tools/lowaTest.py
python3 test.py
-f
tools/taosdemoTest2.py
# subscribe
python3 test.py
-f
subscribe/singlemeter.py
#python3 test.py -f subscribe/stability.py
python3 test.py
-f
subscribe/supertable.py
tests/pytest/pytest_2.sh
浏览文件 @
cc97d60f
...
...
@@ -12,6 +12,7 @@ python3 ./test.py -f update/merge_commit_data2.py
python3 ./test.py
-f
update/merge_commit_data2_update0.py
python3 ./test.py
-f
update/merge_commit_last-0.py
python3 ./test.py
-f
update/merge_commit_last.py
python3 ./test.py
-f
update/bug_td2279.py
# wal
python3 ./test.py
-f
wal/addOldWalTest.py
\ No newline at end of file
tests/test-all.sh
浏览文件 @
cc97d60f
...
...
@@ -202,10 +202,10 @@ if [ "$2" != "sim" ]; then
runPyCaseOneByOnefq fulltest.sh
elif
[
"
$1
"
==
"p1"
]
;
then
echo
"### run Python_1 test ###"
runPyCaseOneByOne pytest_1.sh
runPyCaseOneByOne
fq
pytest_1.sh
elif
[
"
$1
"
==
"p2"
]
;
then
echo
"### run Python_2 test ###"
runPyCaseOneByOne pytest_2.sh
runPyCaseOneByOne
fq
pytest_2.sh
elif
[
"
$1
"
==
"b2"
]
||
[
"
$1
"
==
"b3"
]
;
then
exit
$((
$totalFailed
+
$totalPyFailed
))
elif
[
"
$1
"
==
"smoke"
]
||
[
-z
"
$1
"
]
;
then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录