Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5588aadc
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
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看板
提交
5588aadc
编写于
5月 09, 2022
作者:
P
plum-lihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify testcase that using taosBenchmark to test multi-process table building
上级
1bd4a327
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
8 deletion
+18
-8
tests/system-test/1-insert/insertWithMoreVgroup.py
tests/system-test/1-insert/insertWithMoreVgroup.py
+16
-6
tests/system-test/1-insert/manyVgroups.json
tests/system-test/1-insert/manyVgroups.json
+2
-2
未找到文件。
tests/system-test/1-insert/insertWithMoreVgroup.py
浏览文件 @
5588aadc
...
@@ -199,7 +199,8 @@ class TDTestCase:
...
@@ -199,7 +199,8 @@ class TDTestCase:
os
.
system
(
"%s -f %s -y "
%
(
taosBenchbin
,
jsonFile
))
os
.
system
(
"%s -f %s -y "
%
(
taosBenchbin
,
jsonFile
))
return
return
def
taosBenchCreate
(
self
,
dbname
,
stbname
,
vgroups
,
threadNumbers
,
count
):
def
taosBenchCreate
(
self
,
host
,
dropdb
,
dbname
,
stbname
,
vgroups
,
threadNumbers
,
count
):
# count=50000
# count=50000
buildPath
=
self
.
getBuildPath
()
buildPath
=
self
.
getBuildPath
()
if
(
buildPath
==
""
):
if
(
buildPath
==
""
):
...
@@ -207,12 +208,18 @@ class TDTestCase:
...
@@ -207,12 +208,18 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
taosBenchbin
=
buildPath
+
"/build/bin/taosBenchmark"
taosBenchbin
=
buildPath
+
"/build/bin/taosBenchmark"
buildPath
=
self
.
getBuildPath
()
config
=
buildPath
+
"../sim/dnode1/cfg/"
tsql
=
self
.
newcur
(
host
,
config
)
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
t
dS
ql
.
execute
(
"drop database if exists %s"
%
dbname
)
t
s
ql
.
execute
(
"drop database if exists %s"
%
dbname
)
tdSql
.
execute
(
"create database %s vgroups %d"
%
(
dbname
,
vgroups
))
tsql
.
execute
(
"create database %s vgroups %d"
%
(
dbname
,
vgroups
))
tdSql
.
execute
(
"use %s"
%
dbname
)
print
(
"db has been created"
)
# tsql.getResult("show databases")
# print(tdSql.queryResult)
tsql
.
execute
(
"use %s"
%
dbname
)
threads
=
[]
threads
=
[]
# threadNumbers=2
# threadNumbers=2
...
@@ -220,7 +227,9 @@ class TDTestCase:
...
@@ -220,7 +227,9 @@ class TDTestCase:
jsonfile
=
"1-insert/Vgroups%d%d.json"
%
(
vgroups
,
i
)
jsonfile
=
"1-insert/Vgroups%d%d.json"
%
(
vgroups
,
i
)
os
.
system
(
"cp -f 1-insert/manyVgroups.json %s"
%
(
jsonfile
))
os
.
system
(
"cp -f 1-insert/manyVgroups.json %s"
%
(
jsonfile
))
os
.
system
(
"sed -i 's/
\"
name
\"
:
\"
db
\"
,/
\"
name
\"
:
\"
%s
\"
,/g' %s"
%
(
dbname
,
jsonfile
))
os
.
system
(
"sed -i 's/
\"
name
\"
:
\"
db
\"
,/
\"
name
\"
:
\"
%s
\"
,/g' %s"
%
(
dbname
,
jsonfile
))
os
.
system
(
"sed -i 's/
\"
childtable_count
\"
: 300000,/
\"
childtable_count
\"
: %d,/g' %s "
%
(
count
,
jsonfile
))
os
.
system
(
"sed -i 's/
\"
drop
\"
:
\"
no
\"
,/
\"
drop
\"
:
\"
%s
\"
,/g' %s"
%
(
dropdb
,
jsonfile
))
os
.
system
(
"sed -i 's/
\"
host
\"
:
\"
127.0.0.1
\"
,/
\"
host
\"
:
\"
%s
\"
,/g' %s"
%
(
host
,
jsonfile
))
os
.
system
(
"sed -i 's/
\"
childtable_count
\"
: 10000,/
\"
childtable_count
\"
: %d,/g' %s "
%
(
count
,
jsonfile
))
os
.
system
(
"sed -i 's/
\"
name
\"
:
\"
stb1
\"
,/
\"
name
\"
:
\"
%s%d
\"
,/g' %s "
%
(
stbname
,
i
,
jsonfile
))
os
.
system
(
"sed -i 's/
\"
name
\"
:
\"
stb1
\"
,/
\"
name
\"
:
\"
%s%d
\"
,/g' %s "
%
(
stbname
,
i
,
jsonfile
))
os
.
system
(
"sed -i 's/
\"
childtable_prefix
\"
:
\"
stb1_
\"
,/
\"
childtable_prefix
\"
:
\"
%s%d_
\"
,/g' %s "
%
(
stbname
,
i
,
jsonfile
))
os
.
system
(
"sed -i 's/
\"
childtable_prefix
\"
:
\"
stb1_
\"
,/
\"
childtable_prefix
\"
:
\"
%s%d_
\"
,/g' %s "
%
(
stbname
,
i
,
jsonfile
))
threads
.
append
(
mp
.
Process
(
target
=
self
.
taosBench
,
args
=
(
"%s"
%
jsonfile
,)))
threads
.
append
(
mp
.
Process
(
target
=
self
.
taosBench
,
args
=
(
"%s"
%
jsonfile
,)))
...
@@ -337,7 +346,8 @@ class TDTestCase:
...
@@ -337,7 +346,8 @@ class TDTestCase:
return
return
def
test_case3
(
self
):
def
test_case3
(
self
):
self
.
taosBenchCreate
(
"db1"
,
"stb1"
,
1
,
2
,
1
*
50000
)
# self.taosBenchCreate("chenhaoran02","no","db1", "stb1", 1, 8, 1*10000)
self
.
taosBenchCreate
(
"chenhaoran02"
,
"no"
,
"db1"
,
"stb1"
,
1
,
8
,
1
*
1000
)
# self.taosBenchCreate("db1", "stb1", 4, 5, 100*10000)
# self.taosBenchCreate("db1", "stb1", 4, 5, 100*10000)
# self.taosBenchCreate("db1", "stb1", 1, 5, 100*10000)
# self.taosBenchCreate("db1", "stb1", 1, 5, 100*10000)
...
...
tests/system-test/1-insert/manyVgroups.json
浏览文件 @
5588aadc
{
{
"filetype"
:
"insert"
,
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/taos/"
,
"cfgdir"
:
"/etc/taos/"
,
"host"
:
"
test216
"
,
"host"
:
"
127.0.0.1
"
,
"port"
:
6030
,
"port"
:
6030
,
"user"
:
"root"
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"password"
:
"taosdata"
,
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
{
{
"name"
:
"stb1"
,
"name"
:
"stb1"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
30
0000
,
"childtable_count"
:
1
0000
,
"childtable_prefix"
:
"stb1_"
,
"childtable_prefix"
:
"stb1_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
50000
,
"batch_create_tbl_num"
:
50000
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录