Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
dca3aee5
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
dca3aee5
编写于
6月 19, 2023
作者:
A
Alex Duan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: add splitVGroup to case.task
上级
6f96a780
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
5 deletion
+15
-5
tests/system-test/0-others/splitVGroup.py
tests/system-test/0-others/splitVGroup.py
+15
-5
未找到文件。
tests/system-test/0-others/splitVGroup.py
浏览文件 @
dca3aee5
...
...
@@ -148,11 +148,11 @@ class TDTestCase:
def
prepareEnv
(
self
):
# init
self
.
ts
=
1680000000000
self
.
childCnt
=
10
00
self
.
childRow
=
10000
0
self
.
childCnt
=
10
self
.
childRow
=
10000
self
.
batchSize
=
5000
self
.
vgroups1
=
20
self
.
vgroups2
=
20
self
.
vgroups1
=
4
self
.
vgroups2
=
4
self
.
db1
=
"db1"
self
.
db2
=
"db2"
...
...
@@ -209,12 +209,16 @@ class TDTestCase:
# sql
sql1
=
sql
.
replace
(
'@db_name'
,
self
.
db1
)
tdLog
.
info
(
sql1
)
start1
=
time
.
time
()
rows1
=
tdSql
.
query
(
sql1
)
spend1
=
time
.
time
()
-
start1
res1
=
copy
.
copy
(
tdSql
.
queryResult
)
sql2
=
sql
.
replace
(
'@db_name'
,
self
.
db2
)
tdLog
.
info
(
sql2
)
start2
=
time
.
time
()
tdSql
.
query
(
sql2
)
spend2
=
time
.
time
()
-
start2
res2
=
tdSql
.
queryResult
rowlen1
=
len
(
res1
)
...
...
@@ -237,6 +241,12 @@ class TDTestCase:
tdLog
.
exit
(
f
"col=
{
j
}
col1=
{
row1
[
j
]
}
col2=
{
row2
[
j
]
}
both col not equal."
)
return
False
# warning performance
diff
=
(
spend1
-
spend2
)
*
100
/
spend1
tdLog
.
info
(
"spend1=%.2fs spend2=%.2f diff=%.1f%"
%
(
spend1
,
spend2
,
diff
))
if
spend1
>
spend2
and
diff
>
20
:
tdLog
.
info
(
"warning: the diff for performance after spliting is over 20%"
)
return
True
...
...
@@ -343,7 +353,7 @@ class TDTestCase:
# prepare env
self
.
prepareEnv
()
for
i
in
range
(
10
):
for
i
in
range
(
5
):
# split vgroup on db2
self
.
splitVGroup
(
self
.
db2
)
self
.
vgroups2
+=
1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录