提交 5136e868 编写于 作者: haoranc's avatar haoranc

Merge branch 'dev/chr' of github.com:taosdata/TDengine into dev/chr

...@@ -85,16 +85,16 @@ ...@@ -85,16 +85,16 @@
"tags": [{"type": "TINYINT", "count":1}] "tags": [{"type": "TINYINT", "count":1}]
}, },
{ {
"name": "stb3", "name": "stb2",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 5, "childtable_count": 3,
"childtable_prefix": "stb03_", "childtable_prefix": "stb03_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "json" , "line_protocol": "json" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -111,16 +111,16 @@ ...@@ -111,16 +111,16 @@
"tags": [{"type": "BIGINT", "count":1}] "tags": [{"type": "BIGINT", "count":1}]
}, },
{ {
"name": "stb4", "name": "stb3",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 20, "childtable_count": 4,
"childtable_prefix": "stb04_", "childtable_prefix": "stb04_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "json" , "line_protocol": "json" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -137,16 +137,16 @@ ...@@ -137,16 +137,16 @@
"tags": [{"type": "SMALLINT", "count":1}] "tags": [{"type": "SMALLINT", "count":1}]
}, },
{ {
"name": "stb5", "name": "stb4",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 40, "childtable_count": 5,
"childtable_prefix": "stb05_", "childtable_prefix": "stb05_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "json" , "line_protocol": "json" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -163,16 +163,16 @@ ...@@ -163,16 +163,16 @@
"tags": [{"type": "FLOAT", "count":1}] "tags": [{"type": "FLOAT", "count":1}]
}, },
{ {
"name": "stb6", "name": "stb5",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 15, "childtable_count": 6,
"childtable_prefix": "stb06_", "childtable_prefix": "stb06_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "json" , "line_protocol": "json" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -188,17 +188,43 @@ ...@@ -188,17 +188,43 @@
"columns": [{"type": "DOUBLE"}], "columns": [{"type": "DOUBLE"}],
"tags": [{"type": "DOUBLE", "count":1}] "tags": [{"type": "DOUBLE", "count":1}]
}, },
{
"name": "stb6",
"child_table_exists":"no",
"childtable_count": 7,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
"insert_interval":0,
"max_sql_len": 1025000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2012-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "UINT"}],
"tags": [{"type": "UINT", "count":1}]
},
{ {
"name": "stb7", "name": "stb7",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 10, "childtable_count": 8,
"childtable_prefix": "stb07_", "childtable_prefix": "stb07_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "json" , "line_protocol": "json" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -217,14 +243,14 @@ ...@@ -217,14 +243,14 @@
{ {
"name": "stb8", "name": "stb8",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 20, "childtable_count": 9,
"childtable_prefix": "stb08_", "childtable_prefix": "stb08_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "json" , "line_protocol": "json" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -243,14 +269,14 @@ ...@@ -243,14 +269,14 @@
{ {
"name": "stb9", "name": "stb9",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 3, "childtable_count": 10,
"childtable_prefix": "stb09_", "childtable_prefix": "stb09_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "json" , "line_protocol": "json" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -269,14 +295,14 @@ ...@@ -269,14 +295,14 @@
{ {
"name": "stb10", "name": "stb10",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 3, "childtable_count": 11,
"childtable_prefix": "stb10_", "childtable_prefix": "stb10_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -295,14 +321,14 @@ ...@@ -295,14 +321,14 @@
{ {
"name": "stb11", "name": "stb11",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 3, "childtable_count": 12,
"childtable_prefix": "stb11_", "childtable_prefix": "stb11_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -321,14 +347,14 @@ ...@@ -321,14 +347,14 @@
{ {
"name": "stb12", "name": "stb12",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 3, "childtable_count": 13,
"childtable_prefix": "stb12_", "childtable_prefix": "stb12_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
......
...@@ -97,15 +97,15 @@ class TDTestCase: ...@@ -97,15 +97,15 @@ class TDTestCase:
tdSql.checkData(0, 0, 4000) tdSql.checkData(0, 0, 4000)
# # insert-interface: sml-json # insert-interface: sml-json
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-sml-json-alltype.json -y " % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-sml-json-alltype.json -y " % binPath)
# tdSql.execute("use db") tdSql.execute("use db")
# tdSql.query("show stables") tdSql.query("show stables")
# for i in range(13): for i in range(13):
# for j in range(13): for j in range(13):
# if tdSql.queryResult[i][0] == 'stb%d'%j: if tdSql.queryResult[i][0] == 'stb%d'%j:
# # print(i,"stb%d"%j) # print(i,"stb%d"%j)
# tdSql.checkData(i, 4, j+1) tdSql.checkData(i, 4, j+1)
# insert-interface: sml-telnet # insert-interface: sml-telnet
......
...@@ -95,18 +95,18 @@ class TDTestCase: ...@@ -95,18 +95,18 @@ class TDTestCase:
tdSql.query("select count(*) from `test.0`") tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100) tdSql.checkData(0, 0, 100)
# tdLog.info("use diffrent interface rest") tdLog.info("use diffrent interface rest")
# tdSql.execute("drop database db1;") tdSql.execute("drop database db1;")
# # use diffrent interface -rest # use diffrent interface -rest
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4097 \ os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4097 \
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I rest " % (binPath,cfgPath)) -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I rest " % (binPath,cfgPath))
# tdSql.execute("use db1") tdSql.execute("use db1")
# tdSql.query("select count(*) from meters") tdSql.query("select count(*) from meters")
# tdSql.checkData(0, 0, 1000) tdSql.checkData(0, 0, 1000)
# tdSql.query("select count(tbname) from meters") tdSql.query("select count(tbname) from meters")
# tdSql.checkData(0, 0, 10) tdSql.checkData(0, 0, 10)
# tdSql.query("select count(*) from `test.0`") tdSql.query("select count(*) from `test.0`")
# tdSql.checkData(0, 0, 100) tdSql.checkData(0, 0, 100)
tdLog.info("use diffrent interface sml") tdLog.info("use diffrent interface sml")
tdSql.execute("drop database db1;") tdSql.execute("drop database db1;")
...@@ -121,7 +121,7 @@ class TDTestCase: ...@@ -121,7 +121,7 @@ class TDTestCase:
tdLog.info("all data type") tdLog.info("all data type")
tdSql.execute("drop database db1;") tdSql.execute("drop database db1;")
# all data type # all data type-taosc
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \ os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \
-b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \ -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath)) -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath))
...@@ -132,6 +132,43 @@ class TDTestCase: ...@@ -132,6 +132,43 @@ class TDTestCase:
tdSql.checkData(0, 0, 10) tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from `test.0`") tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100) tdSql.checkData(0, 0, 100)
tdLog.info("all data type")
tdSql.execute("drop database db1;")
# all data type-stmt
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \
-b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I stmt " % (binPath,cfgPath))
tdSql.execute("use db1")
tdSql.query("select count(*) from meters")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(tbname) from meters")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100)
# all data type-rest
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \
-b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I rest " % (binPath,cfgPath))
tdSql.execute("use db1")
tdSql.query("select count(*) from meters")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(tbname) from meters")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100)
# # all data type-rest
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \
# -b INT,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I sml " % (binPath,cfgPath))
# tdSql.execute("use db1")
# tdSql.query("select count(*) from meters")
# tdSql.checkData(0, 0, 1000)
# tdSql.query("select count(tbname) from meters")
# tdSql.checkData(0, 0, 10)
# # tdSql.query("select count(*) from `test.0`")
# # tdSql.checkData(0, 0, 100)
tdLog.info("all data type and interlace rows") tdLog.info("all data type and interlace rows")
tdSql.execute("drop database db1;") tdSql.execute("drop database db1;")
...@@ -164,11 +201,18 @@ class TDTestCase: ...@@ -164,11 +201,18 @@ class TDTestCase:
tdSql.query("select count(*) from `test.0`") tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100) tdSql.checkData(0, 0, 100)
# tdLog.info("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(4096\) \ # taosdemo error
# -w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I stmt" % (binPath,cfgPath)) # too max length
# # taosdemo error-exceeds max length sql = "%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(4096\) \
# assert os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(4096\) \ -w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I taosc" % (binPath,cfgPath)
# -w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I taosc" % (binPath,cfgPath)) != 0 tdLog.info("%s" % sql )
assert os.system("%s" % sql ) != 0
# error password
sql = "%staosBenchmark -u root -c %s -h localhost -P 6030 -p123 -d db1 -a 1 -l 10 -b float,int,NCHAR\(40\) \
-w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I stmt" % (binPath,cfgPath)
tdLog.info("%s" % sql )
assert os.system("%s" % sql ) != 0
testcaseFilename = os.path.split(__file__)[-1] testcaseFilename = os.path.split(__file__)[-1]
os.system("rm -rf ./insert_res*.txt*") os.system("rm -rf ./insert_res*.txt*")
......
...@@ -74,22 +74,23 @@ class TDTestCase: ...@@ -74,22 +74,23 @@ class TDTestCase:
tdSql.query("select count(*) from stb1") tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 3000) tdSql.checkData(0, 0, 3000)
# # insert: using parament "insert_interval to controls spped of insert. # insert: using parament "insert_interval to controls spped of insert.
# # but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。 # but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath)
# tdSql.execute("use db") tdSql.execute("use db")
# tdSql.query("select tbname from db.stb0") # tdSql.query("select count (tbname) from stb0")
# tdSql.checkRows(100 ) tdSql.query("select tbname from db.stb0")
# # tdSql.query("select count(*) from stb00_0") tdSql.checkRows(100 )
# # tdSql.checkData(0, 0, 20) # tdSql.query("select count(*) from stb00_0")
# tdSql.query("select count(*) from stb0") # tdSql.checkData(0, 0, 20)
# tdSql.checkData(0, 0, 2000) tdSql.query("select count(*) from stb0")
# tdSql.query("show stables") tdSql.checkData(0, 0, 2000)
# tdSql.checkData(1, 4, 20) tdSql.query("show stables")
# # tdSql.query("select count(*) from stb01_0") tdSql.checkData(1, 4, 20)
# # tdSql.checkData(0, 0, 35) # tdSql.query("select count(*) from stb01_0")
# tdSql.query("select count(*) from stb1") # tdSql.checkData(0, 0, 35)
# tdSql.checkData(0, 0, 700) tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 700)
# spend 2min30s for 3 testcases. # spend 2min30s for 3 testcases.
# insert: drop and child_table_exists combination test # insert: drop and child_table_exists combination test
...@@ -134,10 +135,13 @@ class TDTestCase: ...@@ -134,10 +135,13 @@ class TDTestCase:
# 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
# tdSql.execute("drop database if exists db") # tdSql.execute("drop database if exists db")
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y " % binPath) # os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y " % binPath)
# tdSql.query("select count(*) from db.stb0") # tdSql.query("select count(*) from db.stb0")
# tdSql.checkRows(0) # tdSql.checkRows(0)
tdSql.execute("drop database if exists db") tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y " % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y " % binPath)
tdSql.execute("use db") tdSql.execute("use db")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册