Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fc0d0bd2
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看板
提交
fc0d0bd2
编写于
8月 27, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify test for development debug
上级
a966bb11
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
16 deletion
+16
-16
tests/pytest/insert/schemalessInsert.py
tests/pytest/insert/schemalessInsert.py
+8
-8
tests/pytest/tools/schemalessInsertPerformance.py
tests/pytest/tools/schemalessInsertPerformance.py
+8
-8
未找到文件。
tests/pytest/insert/schemalessInsert.py
浏览文件 @
fc0d0bd2
...
...
@@ -1053,7 +1053,7 @@ class TDTestCase:
s_stb_d_tb_a_col_m_tag_list
=
self
.
genSqlList
(
stb_name
=
stb_name
)[
5
]
self
.
multiThreadRun
(
self
.
genMultiThreadSeq
(
s_stb_d_tb_a_col_m_tag_list
))
tdSql
.
query
(
f
"show tables;"
)
tdSql
.
checkRows
(
6
)
tdSql
.
checkRows
(
3
)
def
sStbDtbDdataAtMcInsertMultiThreadCheckCase
(
self
):
"""
...
...
@@ -1123,7 +1123,7 @@ class TDTestCase:
tdSql
.
checkRows
(
5
)
for
t
in
[
"t10"
,
"t11"
]:
tdSql
.
query
(
f
"select * from
{
stb_name
}
where
{
t
}
is not NULL;"
)
tdSql
.
checkRows
(
6
)
tdSql
.
checkRows
(
0
)
def
sStbDtbDdataDtsInsertMultiThreadCheckCase
(
self
):
"""
...
...
@@ -1150,7 +1150,7 @@ class TDTestCase:
s_stb_d_tb_d_ts_a_col_m_tag_list
=
self
.
genSqlList
(
stb_name
=
stb_name
)[
11
]
self
.
multiThreadRun
(
self
.
genMultiThreadSeq
(
s_stb_d_tb_d_ts_a_col_m_tag_list
))
tdSql
.
query
(
f
"show tables;"
)
tdSql
.
checkRows
(
6
)
tdSql
.
checkRows
(
3
)
def
test
(
self
):
input_sql1
=
"rfasta,id=
\"
rfasta_1
\"
,t0=true,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7=
\"
ddzhiksj
\"
,t8=L
\"
ncharTagValue
\"
c0=True,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7=
\"
bnhwlgvj
\"
,c8=L
\"
ncharTagValue
\"
,c9=7u64 1626006933640000000ns"
...
...
@@ -1203,19 +1203,19 @@ class TDTestCase:
self
.
sStbDtbDdataInsertMultiThreadCheckCase
()
# # ! concurrency conflict
#
self.sStbDtbDdataAcMtInsertMultiThreadCheckCase()
#
self.sStbDtbDdataAtMcInsertMultiThreadCheckCase()
self
.
sStbDtbDdataAcMtInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataAtMcInsertMultiThreadCheckCase
()
self
.
sStbStbDdataDtsInsertMultiThreadCheckCase
()
# # ! concurrency conflict
#
self.sStbStbDdataDtsAcMtInsertMultiThreadCheckCase()
#
self.sStbStbDdataDtsAtMcInsertMultiThreadCheckCase()
self
.
sStbStbDdataDtsAcMtInsertMultiThreadCheckCase
()
self
.
sStbStbDdataDtsAtMcInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataDtsInsertMultiThreadCheckCase
()
# ! concurrency conflict
#
self.sStbDtbDdataDtsAcMtInsertMultiThreadCheckCase()
self
.
sStbDtbDdataDtsAcMtInsertMultiThreadCheckCase
()
...
...
tests/pytest/tools/schemalessInsertPerformance.py
浏览文件 @
fc0d0bd2
...
...
@@ -116,11 +116,11 @@ class TDTestCase:
'''
schemaless insert api
'''
print
(
threading
.
current_thread
().
name
,
"length="
,
len
(
batch_list
))
print
(
threading
.
current_thread
().
name
,
'firstline'
,
batch_list
[
0
])
print
(
threading
.
current_thread
().
name
,
'lastline:'
,
batch_list
[
-
1
])
self
.
_conn
.
insert_lines
(
batch_list
)
# print(threading.current_thread().name, "length=", len(batch_list))
# print(threading.current_thread().name, 'firstline', batch_list[0])
# print(threading.current_thread().name, 'lastline:', batch_list[-1])
# print(threading.current_thread().name, 'end')
print
(
threading
.
current_thread
().
name
,
'end'
)
def
splitGenerator
(
self
,
table_list
,
sub_list_len
):
'''
...
...
@@ -235,16 +235,16 @@ class TDTestCase:
# col4_time /= test_times
# print(col4_time)
#
tdCom.cleanTb()
tdCom
.
cleanTb
()
for
i
in
range
(
test_times
):
time_used
=
self
.
schemalessPerfTest
(
count
=
100
0
,
table_count
=
table_count
,
sub_list_len
=
sub_list_len
,
thread_count
=
thread_count
)[
0
]
time_used
=
self
.
schemalessPerfTest
(
count
=
100
,
table_count
=
table_count
,
sub_list_len
=
sub_list_len
,
thread_count
=
thread_count
)[
0
]
col1000_time
+=
time_used
col1000_time
/=
test_times
print
(
col1000_time
)
tdCom
.
cleanTb
()
for
i
in
range
(
test_times
):
time_used
=
self
.
schemalessPerfTest
(
count
=
400
0
,
table_count
=
table_count
,
sub_list_len
=
sub_list_len
,
thread_count
=
thread_count
)[
0
]
time_used
=
self
.
schemalessPerfTest
(
count
=
400
,
table_count
=
table_count
,
sub_list_len
=
sub_list_len
,
thread_count
=
thread_count
)[
0
]
col4000_time
+=
time_used
col4000_time
/=
test_times
print
(
col4000_time
)
...
...
@@ -254,7 +254,7 @@ class TDTestCase:
def
run
(
self
):
print
(
"running {}"
.
format
(
__file__
))
tdSql
.
prepare
()
result
=
self
.
getPerfResults
(
test_times
=
3
,
table_count
=
1000
,
sub_list_len
=
100
,
thread_count
=
10
)
result
=
self
.
getPerfResults
(
test_times
=
1
,
table_count
=
1000
,
sub_list_len
=
100
,
thread_count
=
10
)
print
(
result
)
def
stop
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录