Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3897e55d
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看板
未验证
提交
3897e55d
编写于
4月 25, 2022
作者:
M
Minglei Jin
提交者:
GitHub
4月 25, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #11832 from taosdata/xiaoping/2.4
test: update perf test script
上级
496dfa8d
fb2c5256
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
22 deletion
+25
-22
tests/pytest/perfbenchmark/insertFromCSVPerformance.py
tests/pytest/perfbenchmark/insertFromCSVPerformance.py
+4
-3
tests/pytest/perfbenchmark/queryPerformance.py
tests/pytest/perfbenchmark/queryPerformance.py
+15
-14
tests/pytest/perfbenchmark/taosdemoPerformance.py
tests/pytest/perfbenchmark/taosdemoPerformance.py
+6
-5
未找到文件。
tests/pytest/
insert
/insertFromCSVPerformance.py
→
tests/pytest/
perfbenchmark
/insertFromCSVPerformance.py
浏览文件 @
3897e55d
...
...
@@ -32,7 +32,7 @@ class insertFromCSVPerformace:
self
.
host
=
"127.0.0.1"
self
.
user
=
"root"
self
.
password
=
"taosdata"
self
.
config
=
"/etc/
perf"
self
.
config
=
"/etc/
%s"
%
self
.
branchName
self
.
conn
=
taos
.
connect
(
self
.
host
,
self
.
user
,
...
...
@@ -95,6 +95,7 @@ class insertFromCSVPerformace:
in_order_time
=
(
float
)
(
totalTime
/
10
)
print
(
"In order - Insert time: %f"
%
in_order_time
)
cursor
.
execute
(
"drop database if exists %s"
%
self
.
dbName
)
cursor
.
close
()
...
...
@@ -133,9 +134,9 @@ if __name__ == '__main__':
'-b'
,
'--branch-name'
,
action
=
'store'
,
default
=
'
develop
'
,
default
=
'
2.4
'
,
type
=
str
,
help
=
'branch name (default:
develop
)'
)
help
=
'branch name (default:
2.4
)'
)
parser
.
add_argument
(
'-T'
,
'--build-type'
,
...
...
tests/pytest/
query
/queryPerformance.py
→
tests/pytest/
perfbenchmark
/queryPerformance.py
浏览文件 @
3897e55d
...
...
@@ -32,7 +32,7 @@ class taosdemoQueryPerformace:
self
.
host
=
"127.0.0.1"
self
.
user
=
"root"
self
.
password
=
"taosdata"
self
.
config
=
"/etc/
perf"
self
.
config
=
"/etc/
%s"
%
self
.
branch
self
.
conn
=
taos
.
connect
(
self
.
host
,
self
.
user
,
...
...
@@ -55,35 +55,35 @@ class taosdemoQueryPerformace:
tableid
=
1
cursor2
.
execute
(
"create table if not exists %s%d using %s tags(%d, '%s')"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
sql
=
"select avg(
f1), max(f2), min(f3
) from test.meters"
sql
=
"select avg(
current), max(voltage), min(phase
) from test.meters"
tableid
=
2
cursor2
.
execute
(
"create table if not exists %s%d using %s tags(%d, '%s')"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
sql
=
"select count(*) from test.meters where loc='beijing'"
sql
=
"select count(*) from test.meters where loc
ation
='beijing'"
tableid
=
3
cursor2
.
execute
(
"create table if not exists %s%d using %s tags(%d,
\"
%s
\"
)"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
sql
=
"select avg(
f1), max(f2), min(f3) from test.meters where area
id=10"
sql
=
"select avg(
current), max(voltage), min(phase) from test.meters where group
id=10"
tableid
=
4
cursor2
.
execute
(
"create table if not exists %s%d using %s tags(%d, '%s')"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
sql
=
"select avg(
f1), max(f2), min(f3) from test.t
10 interval(10s)"
sql
=
"select avg(
current), max(voltage), min(phase) from test.d
10 interval(10s)"
tableid
=
5
cursor2
.
execute
(
"create table if not exists %s%d using %s tags(%d, '%s')"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
sql
=
"select last_row(*) from meters"
sql
=
"select last_row(*) from
test.
meters"
tableid
=
6
cursor2
.
execute
(
"create table if not exists %s%d using %s tags(%d, '%s')"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
sql
=
"select * from meters limit 10000"
sql
=
"select * from
test.
meters limit 10000"
tableid
=
7
cursor2
.
execute
(
"create table if not exists %s%d using %s tags(%d, '%s')"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
sql
=
"select avg(
f1), max(f2), min(f3
) from meters where ts <= '2017-07-15 10:40:01.000' and ts <= '2017-07-15 14:00:40.000'"
sql
=
"select avg(
current), max(voltage), min(phase
) from meters where ts <= '2017-07-15 10:40:01.000' and ts <= '2017-07-15 14:00:40.000'"
tableid
=
8
cursor2
.
execute
(
"create table if not exists %s%d using %s tags(%d,
\"
%s
\"
)"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
sql
=
"select last(*) from meters"
sql
=
"select last(*) from
test.
meters"
tableid
=
9
cursor2
.
execute
(
"create table if not exists %s%d using %s tags(%d, '%s')"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
...
...
@@ -106,7 +106,7 @@ class taosdemoQueryPerformace:
query_data
=
{
"filetype"
:
"query"
,
"cfgdir"
:
"/etc/
perf"
,
"cfgdir"
:
"/etc/
%s"
%
self
.
branch
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
...
...
@@ -126,6 +126,7 @@ class taosdemoQueryPerformace:
return
query_json_file
def
getBuildPath
(
self
):
buildPath
=
""
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
(
"community"
in
selfPath
):
...
...
@@ -134,7 +135,7 @@ class taosdemoQueryPerformace:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"
taosdemo
"
in
files
):
if
(
"
perfMonitor
"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
@@ -150,7 +151,7 @@ class taosdemoQueryPerformace:
def
query
(
self
):
buildPath
=
self
.
getBuildPath
()
if
(
buildPath
==
""
):
print
(
"
taosdemo
not found!"
)
print
(
"
perfMonitor
not found!"
)
sys
.
exit
(
1
)
binPath
=
buildPath
+
"/build/bin/"
...
...
@@ -220,9 +221,9 @@ if __name__ == '__main__':
'-b'
,
'--git-branch'
,
action
=
'store'
,
default
=
'
master
'
,
default
=
'
2.4
'
,
type
=
str
,
help
=
'git branch (default:
master
)'
)
help
=
'git branch (default:
2.4
)'
)
parser
.
add_argument
(
'-T'
,
'--build-type'
,
...
...
tests/pytest/
tools
/taosdemoPerformance.py
→
tests/pytest/
perfbenchmark
/taosdemoPerformance.py
浏览文件 @
3897e55d
...
...
@@ -32,7 +32,7 @@ class taosdemoPerformace:
self
.
host
=
"127.0.0.1"
self
.
user
=
"root"
self
.
password
=
"taosdata"
self
.
config
=
"/etc/
perf"
self
.
config
=
"/etc/
%s"
%
self
.
branch
self
.
conn
=
taos
.
connect
(
self
.
host
,
self
.
user
,
...
...
@@ -88,7 +88,7 @@ class taosdemoPerformace:
insert_data
=
{
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/
perf"
,
"cfgdir"
:
"/etc/
%s"
%
self
.
branch
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
...
...
@@ -112,6 +112,7 @@ class taosdemoPerformace:
return
output
def
getBuildPath
(
self
):
buildPath
=
""
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
(
"community"
in
selfPath
):
...
...
@@ -130,7 +131,7 @@ class taosdemoPerformace:
def
insertData
(
self
):
buildPath
=
self
.
getBuildPath
()
if
(
buildPath
==
""
):
print
(
"
taosdemo
not found!"
)
print
(
"
perfMonitor
not found!"
)
sys
.
exit
(
1
)
binPath
=
buildPath
+
"/build/bin/"
...
...
@@ -198,9 +199,9 @@ if __name__ == '__main__':
'-b'
,
'--git-branch'
,
action
=
'store'
,
default
=
'
master
'
,
default
=
'
2.4
'
,
type
=
str
,
help
=
'git branch (default:
master
)'
)
help
=
'git branch (default:
2.4
)'
)
parser
.
add_argument
(
'-T'
,
'--build-type'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录