未验证 提交 ae10bb6a 编写于 作者: Y Yang Zhao 提交者: GitHub

[TD-11773]<feature>(tools): taosbenchmark support taosadapter (#9861)

* add test cases

* add test cases

* update test json

* [TD-11773]<feature>(tools): taosbenchmark support taosadapter

* [TD-11773]<feature>(tools): taosbenchmark support taosadapter
上级 6ce91da0
Subproject commit dbc67af5f5a764e4c7950923e4e08741a7874168
Subproject commit 8c11dcf6856bca0860e7e9999f57274864218f4f
......@@ -6,7 +6,7 @@
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_pool_size": 20,
"thread_pool_size": 10,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"prepared_rand": 100,
......
......@@ -4,7 +4,7 @@
"confirm_parameter_prompt": "no",
"databases": "db",
"query_mode": "rest",
"thread_pool_size": 20,
"thread_pool_size": 10,
"response_buffer": 10000,
"specified_table_query":
{
......
......@@ -6,7 +6,7 @@
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_pool_size": 20,
"thread_pool_size": 10,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"prepared_rand": 100,
......
......@@ -6,7 +6,7 @@
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_pool_size": 20,
"thread_pool_size": 10,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"prepared_rand": 10,
......
......@@ -6,7 +6,7 @@
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_pool_size": 20,
"thread_pool_size": 10,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"prepared_rand": 10,
......
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_pool_size": 20,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"prepared_rand": 10,
"chinese": "no",
"insert_interval": 0,
"num_of_records_per_req": 10,
"databases": [
{
"dbinfo": {
"name": "db3",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp": 2,
"walLevel": 1,
"cachelast": 0,
"quorum": 1,
"fsync": 3000,
"update": 0
},
"super_tables": [
{
"name": "stb1",
"child_table_exists": "no",
"childtable_count": 8,
"childtable_prefix": "stb1_",
"escape_character": "no",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "sml-rest",
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
"insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "now",
"sample_file": "",
"use_sample_ts": "no",
"tags_file": "",
"columns": [
{
"type": "INT"
}
],
"tags": [
{
"type": "INT"
}
]
},{
"name": "stb2",
"child_table_exists": "no",
"childtable_count": 8,
"childtable_prefix": "stb2_",
"escape_character": "no",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "sml-rest",
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
"insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 3,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "now",
"sample_file": "",
"use_sample_ts": "no",
"tags_file": "",
"columns": [
{
"type": "INT"
}
],
"tags": [
{
"type": "INT"
}
]
}
]
}
]
}
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_pool_size": 20,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"prepared_rand": 10,
"chinese": "no",
"insert_interval": 0,
"num_of_records_per_req": 10,
"databases": [
{
"dbinfo": {
"name": "db2",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp": 2,
"walLevel": 1,
"cachelast": 0,
"quorum": 1,
"fsync": 3000,
"update": 0
},
"super_tables": [
{
"name": "stb1",
"child_table_exists": "no",
"childtable_count": 8,
"childtable_prefix": "stb1_",
"escape_character": "no",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "sml-rest",
"line_protocol": "line",
"childtable_limit": 0,
"childtable_offset": 0,
"insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "now",
"sample_file": "",
"use_sample_ts": "no",
"tags_file": "",
"columns": [
{
"type": "INT"
},
{
"type": "BIGINT"
},
{
"type": "FLOAT"
},
{
"type": "DOUBLE"
},
{
"type": "SMALLINT"
},
{
"type": "TINYINT"
},
{
"type": "BOOL"
},
{
"type": "NCHAR",
"len": 17,
"count": 1
},
{
"type": "UINT"
},
{
"type": "UBIGINT"
},
{
"type": "UTINYINT"
},
{
"type": "USMALLINT"
},
{
"type": "BINARY",
"len": 19,
"count": 1
}
],
"tags": [
{
"type": "INT"
},
{
"type": "BIGINT"
},
{
"type": "FLOAT"
},
{
"type": "DOUBLE"
},
{
"type": "SMALLINT"
},
{
"type": "TINYINT"
},
{
"type": "BOOL"
},
{
"type": "NCHAR",
"len": 17,
"count": 1
},
{
"type": "UINT"
},
{
"type": "UBIGINT"
},
{
"type": "UTINYINT"
},
{
"type": "USMALLINT"
},
{
"type": "BINARY",
"len": 19,
"count": 1
}
]
},{
"name": "stb2",
"child_table_exists": "no",
"childtable_count": 8,
"childtable_prefix": "stb2_",
"escape_character": "no",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "sml-rest",
"line_protocol": "line",
"childtable_limit": 0,
"childtable_offset": 0,
"insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 6,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "now",
"sample_file": "",
"use_sample_ts": "no",
"tags_file": "",
"columns": [
{
"type": "INT"
},
{
"type": "BIGINT"
},
{
"type": "FLOAT"
},
{
"type": "DOUBLE"
},
{
"type": "SMALLINT"
},
{
"type": "TINYINT"
},
{
"type": "BOOL"
},
{
"type": "NCHAR",
"len": 17,
"count": 1
},
{
"type": "UINT"
},
{
"type": "UBIGINT"
},
{
"type": "UTINYINT"
},
{
"type": "USMALLINT"
},
{
"type": "BINARY",
"len": 19,
"count": 1
}
],
"tags": [
{
"type": "INT"
},
{
"type": "BIGINT"
},
{
"type": "FLOAT"
},
{
"type": "DOUBLE"
},
{
"type": "SMALLINT"
},
{
"type": "TINYINT"
},
{
"type": "BOOL"
},
{
"type": "NCHAR",
"len": 17,
"count": 1
},
{
"type": "UINT"
},
{
"type": "UBIGINT"
},
{
"type": "UTINYINT"
},
{
"type": "USMALLINT"
},
{
"type": "BINARY",
"len": 19,
"count": 1
}
]
}
]
}
]
}
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_pool_size": 20,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"prepared_rand": 10,
"chinese": "no",
"insert_interval": 0,
"num_of_records_per_req": 10,
"databases": [
{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp": 2,
"walLevel": 1,
"cachelast": 0,
"quorum": 1,
"fsync": 3000,
"update": 0
},
"super_tables": [
{
"name": "stb1",
"child_table_exists": "no",
"childtable_count": 8,
"childtable_prefix": "stb1_",
"escape_character": "no",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "sml-rest",
"line_protocol": "telnet",
"childtable_limit": 0,
"childtable_offset": 0,
"insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "now",
"sample_file": "",
"use_sample_ts": "no",
"tags_file": "",
"columns": [
{
"type": "INT"
}
],
"tags": [
{
"type": "INT"
},
{
"type": "BIGINT"
},
{
"type": "FLOAT"
},
{
"type": "DOUBLE"
},
{
"type": "SMALLINT"
},
{
"type": "TINYINT"
},
{
"type": "BOOL"
},
{
"type": "NCHAR",
"len": 17,
"count": 1
},
{
"type": "UINT"
},
{
"type": "UBIGINT"
},
{
"type": "UTINYINT"
},
{
"type": "USMALLINT"
},
{
"type": "BINARY",
"len": 19,
"count": 1
}
]
},{
"name": "stb2",
"child_table_exists": "no",
"childtable_count": 8,
"childtable_prefix": "stb2_",
"escape_character": "no",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "sml-rest",
"line_protocol": "telnet",
"childtable_limit": 0,
"childtable_offset": 0,
"insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 5,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "now",
"sample_file": "",
"use_sample_ts": "no",
"tags_file": "",
"columns": [
{
"type": "INT"
}
],
"tags": [
{
"type": "INT"
},
{
"type": "BIGINT"
},
{
"type": "FLOAT"
},
{
"type": "DOUBLE"
},
{
"type": "SMALLINT"
},
{
"type": "TINYINT"
},
{
"type": "BOOL"
},
{
"type": "NCHAR",
"len": 17,
"count": 1
},
{
"type": "UINT"
},
{
"type": "UBIGINT"
},
{
"type": "UTINYINT"
},
{
"type": "USMALLINT"
},
{
"type": "BINARY",
"len": 19,
"count": 1
}
]
}
]
}
]
}
......@@ -6,7 +6,7 @@
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_pool_size": 20,
"thread_pool_size": 10,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"prepared_rand": 10,
......
......@@ -6,7 +6,7 @@
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_pool_size": 20,
"thread_pool_size": 10,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"prepared_rand": 100,
......
......@@ -6,7 +6,7 @@
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_pool_size": 20,
"thread_pool_size": 10,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"prepared_rand": 100,
......
......@@ -29,7 +29,7 @@ class TDTestCase:
tdSql.init(conn.cursor(), logSql)
def run(self):
cmd = "taosBenchmark -f ./5-taos-tools/taosbenchmark/json/json_alltypes.json"
cmd = "taosBenchmark -f ./5-taos-tools/taosbenchmark/json/sml_json_alltypes.json"
tdLog.info("%s" % cmd)
os.system("%s" % cmd)
tdSql.execute("reset query cache")
......
......@@ -29,7 +29,7 @@ class TDTestCase:
tdSql.init(conn.cursor(), logSql)
def run(self):
cmd = "taosBenchmark -f ./5-taos-tools/taosbenchmark/json/telnet_alltypes.json"
cmd = "taosBenchmark -f ./5-taos-tools/taosbenchmark/json/sml_telnet_alltypes.json"
tdLog.info("%s" % cmd)
os.system("%s" % cmd)
tdSql.execute("reset query cache")
......
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import os
from util.log import *
from util.cases import *
from util.sql import *
from util.dnodes import *
class TDTestCase:
def caseDescription(self):
'''
[TD-11510] taosBenchmark test cases
'''
return
def init(self, conn, logSql):
tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql)
def run(self):
cmd = "taosBenchmark -f ./5-taos-tools/taosbenchmark/json/sml_rest_telnet.json"
tdLog.info("%s" % cmd)
os.system("%s" % cmd)
tdSql.execute("reset query cache")
tdSql.query("select count(tbname) from db.stb1")
tdSql.checkData(0, 0, 8)
tdSql.query("select count(*) from db.stb1")
tdSql.checkData(0, 0, 160)
tdSql.query("select count(tbname) from db.stb2")
tdSql.checkData(0, 0, 8)
tdSql.query("select count(*) from db.stb2")
tdSql.checkData(0, 0, 160)
cmd = "taosBenchmark -f ./5-taos-tools/taosbenchmark/json/sml_rest_line.json"
tdLog.info("%s" % cmd)
os.system("%s" % cmd)
tdSql.execute("reset query cache")
tdSql.query("select count(tbname) from db2.stb1")
tdSql.checkData(0, 0, 8)
tdSql.query("select count(*) from db2.stb1")
tdSql.checkData(0, 0, 160)
tdSql.query("select count(tbname) from db2.stb2")
tdSql.checkData(0, 0, 8)
tdSql.query("select count(*) from db2.stb2")
tdSql.checkData(0, 0, 160)
cmd = "taosBenchmark -f ./5-taos-tools/taosbenchmark/json/sml_rest_json.json"
tdLog.info("%s" % cmd)
os.system("%s" % cmd)
tdSql.execute("reset query cache")
tdSql.query("select count(tbname) from db3.stb1")
tdSql.checkData(0, 0, 8)
tdSql.query("select count(*) from db3.stb1")
tdSql.checkData(0, 0, 160)
tdSql.query("select count(tbname) from db3.stb2")
tdSql.checkData(0, 0, 8)
tdSql.query("select count(*) from db3.stb2")
tdSql.checkData(0, 0, 160)
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase())
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册