Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6122c437
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看板
提交
6122c437
编写于
1月 10, 2022
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-11562]<test>(tools):add testcase of taosdump
上级
7af779d9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
11 deletion
+29
-11
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
...st/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
+4
-4
tests/pytest/tools/taosdumpTestBenchmark.py
tests/pytest/tools/taosdumpTestBenchmark.py
+25
-7
未找到文件。
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
浏览文件 @
6122c437
...
@@ -131,10 +131,10 @@ class TDTestCase:
...
@@ -131,10 +131,10 @@ class TDTestCase:
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staosBenchmark -f tools/taosdemoAllTest/sml/insertSigcolumnsNum4096-sml.json -y "
%
binPath
)
os
.
system
(
"%staosBenchmark -f tools/taosdemoAllTest/sml/insertSigcolumnsNum4096-sml.json -y "
%
binPath
)
tdSql
.
error
(
"select * from db.stb0"
)
tdSql
.
error
(
"select * from db.stb0"
)
#
tdSql.execute("drop database if exists db")
tdSql
.
execute
(
"drop database if exists db"
)
#
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y " % binPath)
os
.
system
(
"%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y "
%
binPath
)
#
tdSql.query("select count(*) from db.stb0")
tdSql
.
query
(
"select count(*) from db.stb0"
)
#
tdSql.checkData(0, 0, 10000)
tdSql
.
checkData
(
0
,
0
,
10000
)
# there is no limit of 4096 columns,so cancels this case
# there is no limit of 4096 columns,so cancels this case
# tdSql.execute("drop database if exists db")
# tdSql.execute("drop database if exists db")
...
...
tests/pytest/tools/taosdumpTestBenchmark.py
浏览文件 @
6122c437
...
@@ -74,7 +74,7 @@ class TDTestCase:
...
@@ -74,7 +74,7 @@ class TDTestCase:
os
.
system
(
"rm -rf ./taosdumptest"
)
os
.
system
(
"rm -rf ./taosdumptest"
)
os
.
makedirs
(
"./taosdumptest"
)
os
.
makedirs
(
"./taosdumptest"
)
for
i
in
range
(
1
):
for
i
in
range
(
2
):
if
not
os
.
path
.
exists
(
"./taosdumptest/tmp%d"
%
i
):
if
not
os
.
path
.
exists
(
"./taosdumptest/tmp%d"
%
i
):
os
.
makedirs
(
"./taosdumptest/tmp%d"
%
i
)
os
.
makedirs
(
"./taosdumptest/tmp%d"
%
i
)
else
:
else
:
...
@@ -122,7 +122,7 @@ class TDTestCase:
...
@@ -122,7 +122,7 @@ class TDTestCase:
%
(
j
,
self
.
ts
+
i
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
0.1
,
i
+
0.1
,
i
%
2
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
,
self
.
ts
))
%
(
j
,
self
.
ts
+
i
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
0.1
,
i
+
0.1
,
i
%
2
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
,
self
.
ts
))
intData
.
append
(
i
+
1
)
intData
.
append
(
i
+
1
)
floatData
.
append
(
i
+
0.1
)
floatData
.
append
(
i
+
0.1
)
os
.
system
(
"%staosBenchmark -f tools/taosdump-insert-dp1.json -y "
%
binPath
)
#
os.system("%staosBenchmark -f tools/taosdump-insert-dp1.json -y " % binPath)
# create db1 , three stables:stb0,include ctables stb0_0 \ stb0_1,stb1 include ctables stb1_0 and stb1_1
# create db1 , three stables:stb0,include ctables stb0_0 \ stb0_1,stb1 include ctables stb1_0 and stb1_1
...
@@ -149,7 +149,7 @@ class TDTestCase:
...
@@ -149,7 +149,7 @@ class TDTestCase:
tdSql
.
execute
(
"insert into gt1 values(1614218413800,8638,78.862020199)"
)
tdSql
.
execute
(
"insert into gt1 values(1614218413800,8638,78.862020199)"
)
tdSql
.
execute
(
"insert into gt2 values(1614218413900,8639,78.863)"
)
tdSql
.
execute
(
"insert into gt2 values(1614218413900,8639,78.863)"
)
# self.insert_data("t", self.ts, 300*10000);
# self.insert_data("t", self.ts, 300*10000);
os
.
system
(
"%staosBenchmark -f tools/taosdump-insert-dp2.json -y "
%
binPath
)
#
os.system("%staosBenchmark -f tools/taosdump-insert-dp2.json -y " % binPath)
...
@@ -157,10 +157,12 @@ class TDTestCase:
...
@@ -157,10 +157,12 @@ class TDTestCase:
# # taosdump data
# # taosdump data
# os.system("%staosdump -o ./taosdumptest/tmp1 taosdump -h -ptaosdata -P 6030 -u root -o taosdumptest \
# os.system("%staosdump -o ./taosdumptest/tmp1 taosdump -h -ptaosdata -P 6030 -u root -o taosdumptest \
# -D dp1,dp3 -N -c /home/chr/TDinternal/community/sim/dnode1/cfg/taos.cfg -s -d deflate" % binPath)
# -D dp1,dp3 -N -c /home/chr/TDinternal/community/sim/dnode1/cfg/taos.cfg -s -d deflate" % binPath)
os
.
system
(
"%staosdump -o ./taosdumptest/tmp0 -D dp2 -T 8 -B 100000"
%
binPath
)
os
.
system
(
"%staosdump -o ./taosdumptest/tmp0 -D dp2,dp1 -T 8 -B 100000"
%
binPath
)
os
.
system
(
"%staosdump -o ./taosdumptest/tmp1 dp2 st0 st1_0 gt0 -T 8 -B 1000"
%
binPath
)
#check taosdumptest/tmp0
#check taosdumptest/tmp0
#
tdSql.execute("drop database dp1")
tdSql
.
execute
(
"drop database dp1"
)
tdSql
.
execute
(
"drop database dp2"
)
tdSql
.
execute
(
"drop database dp2"
)
os
.
system
(
"%staosdump -i ./taosdumptest/tmp0 -T 8 "
%
binPath
)
os
.
system
(
"%staosdump -i ./taosdumptest/tmp0 -T 8 "
%
binPath
)
tdSql
.
execute
(
"reset query cache"
)
tdSql
.
execute
(
"reset query cache"
)
...
@@ -203,8 +205,6 @@ class TDTestCase:
...
@@ -203,8 +205,6 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
4
)
tdSql
.
checkData
(
0
,
0
,
4
)
tdSql
.
query
(
"select count(*) from st2"
)
tdSql
.
query
(
"select count(*) from st2"
)
tdSql
.
checkData
(
0
,
0
,
1000024
)
tdSql
.
checkData
(
0
,
0
,
1000024
)
tdSql
.
query
(
"select ts from gt0"
)
tdSql
.
query
(
"select ts from gt0"
)
tdSql
.
checkData
(
0
,
0
,
'2021-02-25 10:00:12.700'
)
tdSql
.
checkData
(
0
,
0
,
'2021-02-25 10:00:12.700'
)
tdSql
.
query
(
"select c10 from gt1"
)
tdSql
.
query
(
"select c10 from gt1"
)
...
@@ -212,6 +212,24 @@ class TDTestCase:
...
@@ -212,6 +212,24 @@ class TDTestCase:
tdSql
.
query
(
"select c20 from gt2"
)
tdSql
.
query
(
"select c20 from gt2"
)
tdSql
.
checkData
(
0
,
0
,
8639
)
tdSql
.
checkData
(
0
,
0
,
8639
)
#check taosdumptest/tmp1
tdSql
.
execute
(
"drop database dp1"
)
tdSql
.
execute
(
"drop database dp2"
)
os
.
system
(
"%staosdump -i ./taosdumptest/tmp1 -T 8 "
%
binPath
)
tdSql
.
execute
(
"reset query cache"
)
tdSql
.
execute
(
"use dp2"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
"select count(*) from st1_0"
)
tdSql
.
checkData
(
0
,
0
,
2
)
tdSql
.
query
(
"select ts from gt0"
)
tdSql
.
checkData
(
0
,
0
,
'2021-02-25 10:00:12.700'
)
tdSql
.
error
(
"use dp1"
)
tdSql
.
error
(
"select count(*) from st2_0"
)
tdSql
.
error
(
"select count(*) from gt2"
)
# #check taosdumptest/tmp2
# #check taosdumptest/tmp2
# tdSql.execute("drop database dp1")
# tdSql.execute("drop database dp1")
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录