test: migrate 3.0 test case (#15635)
* test: add test case in 3.0 * fix: remove result file * test: change test cases * fix: change test case * test: add test to ci * test: add test case of taosbenchmark in system-test * fix: fix test case * test: unknown error in ci
This commit is contained in:
parent
56ca1ac288
commit
e95c1356ef
|
@ -0,0 +1,161 @@
|
|||
###################################################################
|
||||
# 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 *
|
||||
from util.taosadapter 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())
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tAdapter.init("")
|
||||
tAdapter.deploy()
|
||||
tAdapter.start()
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/taosc_auto_create_table.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system(cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb1)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.stb1")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select distinct(c5) from db.stb1")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c6) from db.stb1")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c7) from db.stb1")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c8) from db.stb1")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c9) from db.stb1")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c10) from db.stb1")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c11) from db.stb1")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c12) from db.stb1")
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.`stb1-2`)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.`stb1-2`")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select distinct(c5) from db.`stb1-2`")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c6) from db.`stb1-2`")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c7) from db.`stb1-2`")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c8) from db.`stb1-2`")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c9) from db.`stb1-2`")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c10) from db.`stb1-2`")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c11) from db.`stb1-2`")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c12) from db.`stb1-2`")
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/stmt_auto_create_table.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb2)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.stb2")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkData(2, 14, "us")
|
||||
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.`stb2-2`)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.`stb2-2`")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/rest_auto_create_table.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb3)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.stb3")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkData(2, 14, "ns")
|
||||
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.`stb3-2`)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.`stb3-2`")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_auto_create_table.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb4)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.stb4")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.`stb4-2`)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.`stb4-2`")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,313 @@
|
|||
###################################################################
|
||||
# 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
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -F 7 -H 9 -n 10 -t 2 -x -y -M -C -d newtest -l 5 -A binary,nchar\(31\) -b tinyint,binary\(23\),bool,nchar -w 29 -E -m $%%^*" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("use newtest")
|
||||
tdSql.query("select count(*) from newtest.meters")
|
||||
tdSql.checkData(0, 0, 20)
|
||||
tdSql.query("describe meters")
|
||||
tdSql.checkRows(8)
|
||||
tdSql.checkData(0, 1, "TIMESTAMP")
|
||||
tdSql.checkData(1, 1, "TINYINT")
|
||||
tdSql.checkData(2, 1, "VARCHAR")
|
||||
tdSql.checkData(2, 2, 23)
|
||||
tdSql.checkData(3, 1, "BOOL")
|
||||
tdSql.checkData(4, 1, "NCHAR")
|
||||
tdSql.checkData(4, 2, 29)
|
||||
tdSql.checkData(5, 1, "INT")
|
||||
tdSql.checkData(6, 1, "VARCHAR")
|
||||
tdSql.checkData(6, 2, 29)
|
||||
tdSql.checkData(6, 3, "TAG")
|
||||
tdSql.checkData(7, 1, "NCHAR")
|
||||
tdSql.checkData(7, 2, 31)
|
||||
tdSql.checkData(7, 3, "TAG")
|
||||
tdSql.query("select distinct(tbname) from meters where tbname like '$%^*%'")
|
||||
tdSql.checkRows(2)
|
||||
tdSql.execute("drop database if exists newtest")
|
||||
|
||||
cmd = "%s -F 7 -n 10 -t 2 -y -M -I stmt" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from test.meters)")
|
||||
tdSql.checkData(0, 0, 2)
|
||||
tdSql.query("select count(*) from test.meters")
|
||||
tdSql.checkData(0, 0, 20)
|
||||
|
||||
cmd = "%s -n 3 -t 3 -B 2 -i 1 -G -y -T 1 2>&1 | grep sleep | wc -l" %binPath
|
||||
sleepTimes = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
if (int(sleepTimes) != 2):
|
||||
tdLog.exit("expected sleep times 2, actual %d" % int(sleepTimes))
|
||||
|
||||
cmd = "%s -n 3 -t 3 -B 2 -i 1 -G -y -T 1 -r 1 2>&1 | grep sleep | wc -l" %binPath
|
||||
sleepTimes = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
if (int(sleepTimes) != 3):
|
||||
tdLog.exit("expected sleep times 3, actual %d" % int(sleepTimes))
|
||||
|
||||
cmd = "%s -n 3 -t 3 -B 2 -i 1 -G -y -T 1 -I sml 2>&1 | grep sleep | wc -l" %binPath
|
||||
sleepTimes = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
if (int(sleepTimes) != 2):
|
||||
tdLog.exit("expected sleep times 2, actual %d" % int(sleepTimes))
|
||||
|
||||
cmd = "%s -n 3 -t 3 -B 2 -i 1 -G -y -T 1 -r 1 -I sml 2>&1 | grep sleep | wc -l" %binPath
|
||||
sleepTimes = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
if (int(sleepTimes) != 3):
|
||||
tdLog.exit("expected sleep times 3, actual %d" % int(sleepTimes))
|
||||
|
||||
cmd = "%s -n 3 -t 3 -B 2 -i 1 -G -y -T 1 -I stmt 2>&1 | grep sleep | wc -l" %binPath
|
||||
sleepTimes = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
if (int(sleepTimes) != 2):
|
||||
tdLog.exit("expected sleep times 2, actual %d" % int(sleepTimes))
|
||||
|
||||
cmd = "%s -n 3 -t 3 -B 2 -i 1 -G -y -T 1 -r 1 -I stmt 2>&1 | grep sleep | wc -l" %binPath
|
||||
sleepTimes = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
if (int(sleepTimes) != 3):
|
||||
tdLog.exit("expected sleep times 3, actual %d" % int(sleepTimes))
|
||||
|
||||
cmd = "%s -S 17 -n 3 -t 1 -y -x" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select last(ts) from test.meters")
|
||||
tdSql.checkData(0, 0 , "2017-07-14 10:40:00.034")
|
||||
|
||||
cmd = "%s -N -I taosc -t 11 -n 11 -y -x -E" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("use test")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(0)
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(11)
|
||||
tdSql.query("select count(*) from `d10`")
|
||||
tdSql.checkData(0, 0, 11)
|
||||
|
||||
cmd = "%s -N -I rest -t 11 -n 11 -y -x" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("use test")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(0)
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(11)
|
||||
tdSql.query("select count(*) from d10")
|
||||
tdSql.checkData(0, 0, 11)
|
||||
|
||||
cmd = "%s -N -I stmt -t 11 -n 11 -y -x" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("use test")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(0)
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(11)
|
||||
tdSql.query("select count(*) from d10")
|
||||
tdSql.checkData(0, 0, 11)
|
||||
|
||||
cmd = "%s -N -I sml -y" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
assert(os.system("%s" % cmd) !=0 )
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b bool" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "BOOL")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b tinyint" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "TINYINT")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b utinyint" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "TINYINT UNSIGNED")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b smallint" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "SMALLINT")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b usmallint" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "SMALLINT UNSIGNED")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b int" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "INT")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b uint" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "INT UNSIGNED")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b bigint" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "BIGINT")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b ubigint" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "BIGINT UNSIGNED")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b timestamp" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "TIMESTAMP")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b float" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "FLOAT")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b double" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "DOUBLE")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b nchar" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "NCHAR")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b nchar\(7\)" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "NCHAR")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b binary" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "VARCHAR")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b binary\(7\)" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(1, 1, "VARCHAR")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -A json\(7\)" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe test.meters")
|
||||
tdSql.checkData(4, 1, "JSON")
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -b int,x" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
assert(os.system("%s" % cmd) != 0)
|
||||
|
||||
cmd = "%s -n 1 -t 1 -y -A int,json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
assert(os.system("%s" % cmd) != 0)
|
||||
|
||||
|
||||
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1 @@
|
|||
17
|
|
|
@ -0,0 +1,3 @@
|
|||
1641976781445,1
|
||||
1641976781446,2
|
||||
1641976781447,3
|
|
|
@ -0,0 +1,88 @@
|
|||
###################################################################
|
||||
# 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-13928] taosBenchmark improve user interface
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/custom_col_tag.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe db.stb")
|
||||
tdSql.checkData(0, 0, "ts")
|
||||
tdSql.checkData(1, 0, "first_type")
|
||||
tdSql.checkData(2, 0, "second_type")
|
||||
tdSql.checkData(3, 0, "second_type_1")
|
||||
tdSql.checkData(4, 0, "second_type_2")
|
||||
tdSql.checkData(5, 0, "second_type_3")
|
||||
tdSql.checkData(6, 0, "second_type_4")
|
||||
tdSql.checkData(7, 0, "third_type")
|
||||
tdSql.checkData(8, 0, "forth_type")
|
||||
tdSql.checkData(9, 0, "forth_type_1")
|
||||
tdSql.checkData(10, 0, "forth_type_2")
|
||||
tdSql.checkData(11, 0, "single")
|
||||
tdSql.checkData(12, 0, "multiple")
|
||||
tdSql.checkData(13, 0, "multiple_1")
|
||||
tdSql.checkData(14, 0, "multiple_2")
|
||||
tdSql.checkData(15, 0, "multiple_3")
|
||||
tdSql.checkData(16, 0, "multiple_4")
|
||||
tdSql.checkData(17, 0, "thensingle")
|
||||
tdSql.checkData(18, 0, "thenmultiple")
|
||||
tdSql.checkData(19, 0, "thenmultiple_1")
|
||||
tdSql.checkData(20, 0, "thenmultiple_2")
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,70 @@
|
|||
###################################################################
|
||||
# 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/default.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb)")
|
||||
tdSql.checkData(0, 0, 10)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
tdSql.checkData(0, 0, 100)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,96 @@
|
|||
###################################################################
|
||||
# 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
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
[TD-13823] taosBenchmark test cases
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -n 100 -t 100 -y" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("use test")
|
||||
tdSql.query("select count(*) from test.meters")
|
||||
tdSql.checkData(0, 0, 10000)
|
||||
|
||||
tdSql.query("describe meters")
|
||||
tdSql.checkRows(6)
|
||||
tdSql.checkData(0, 1, "TIMESTAMP")
|
||||
tdSql.checkData(0, 0, "ts")
|
||||
tdSql.checkData(1, 0, "current")
|
||||
tdSql.checkData(1, 1, "FLOAT")
|
||||
tdSql.checkData(2, 0, "voltage")
|
||||
tdSql.checkData(2, 1, "INT")
|
||||
tdSql.checkData(3, 0, "phase")
|
||||
tdSql.checkData(3, 1, "FLOAT")
|
||||
tdSql.checkData(4, 0, "groupid")
|
||||
tdSql.checkData(4, 1, "INT")
|
||||
tdSql.checkData(4, 3, "TAG")
|
||||
tdSql.checkData(5, 0, "location")
|
||||
tdSql.checkData(5, 1, "VARCHAR")
|
||||
tdSql.checkData(5, 2, 16)
|
||||
tdSql.checkData(5, 3, "TAG")
|
||||
|
||||
tdSql.query("select count(*) from test.meters where groupid >= 0")
|
||||
tdSql.checkData(0, 0, 10000)
|
||||
|
||||
tdSql.query("select count(*) from test.meters where location = 'San Francisco' or location = 'Los Angles' or location = 'San Diego' or location = 'San Jose' or \
|
||||
location = 'Palo Alto' or location = 'Campbell' or location = 'Mountain View' or location = 'Sunnyvale' or location = 'Santa Clara' or location = 'Cupertino' ")
|
||||
tdSql.checkData(0, 0, 10000)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,330 @@
|
|||
###################################################################
|
||||
# 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 *
|
||||
from util.taosadapter 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tAdapter.init("")
|
||||
tAdapter.deploy()
|
||||
tAdapter.start()
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/taosc_insert_alltypes.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe db.stb")
|
||||
tdSql.checkRows(29)
|
||||
tdSql.checkData(0, 1, "TIMESTAMP")
|
||||
tdSql.checkData(1, 1, "TIMESTAMP")
|
||||
tdSql.checkData(2, 1, "INT")
|
||||
tdSql.checkData(3, 1, "BIGINT")
|
||||
tdSql.checkData(4, 1, "FLOAT")
|
||||
tdSql.checkData(5, 1, "DOUBLE")
|
||||
tdSql.checkData(6, 1, "SMALLINT")
|
||||
tdSql.checkData(7, 1, "TINYINT")
|
||||
tdSql.checkData(8, 1, "BOOL")
|
||||
tdSql.checkData(9, 1, "NCHAR")
|
||||
tdSql.checkData(9, 2, 29)
|
||||
tdSql.checkData(10, 1, "INT UNSIGNED")
|
||||
tdSql.checkData(11, 1, "BIGINT UNSIGNED")
|
||||
tdSql.checkData(12, 1, "TINYINT UNSIGNED")
|
||||
tdSql.checkData(13, 1, "SMALLINT UNSIGNED")
|
||||
tdSql.checkData(14, 1, "VARCHAR")
|
||||
tdSql.checkData(14, 2, 23)
|
||||
tdSql.checkData(15, 1, "TIMESTAMP")
|
||||
tdSql.checkData(16, 1, "INT")
|
||||
tdSql.checkData(17, 1, "BIGINT")
|
||||
tdSql.checkData(18, 1, "FLOAT")
|
||||
tdSql.checkData(19, 1, "DOUBLE")
|
||||
tdSql.checkData(20, 1, "SMALLINT")
|
||||
tdSql.checkData(21, 1, "TINYINT")
|
||||
tdSql.checkData(22, 1, "BOOL")
|
||||
tdSql.checkData(23, 1, "NCHAR")
|
||||
tdSql.checkData(23, 2, 17)
|
||||
tdSql.checkData(24, 1, "INT UNSIGNED")
|
||||
tdSql.checkData(25, 1, "BIGINT UNSIGNED")
|
||||
tdSql.checkData(26, 1, "TINYINT UNSIGNED")
|
||||
tdSql.checkData(27, 1, "SMALLINT UNSIGNED")
|
||||
tdSql.checkData(28, 1, "VARCHAR")
|
||||
tdSql.checkData(28, 2, 19)
|
||||
tdSql.query("select count(*) from db.stb where c1 >= 0 and c1 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c2 >= 0 and c2 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c3 >= 0 and c3 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c4 >= 0 and c4 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c5 >= 0 and c5 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c6 >= 0 and c6 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c8 = 'd1' or c8 = 'd2'")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c9 >= 0 and c9 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c10 >= 0 and c10 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c11 >= 0 and c11 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c12 >= 0 and c12 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c13 = 'b1' or c13 = 'b2'")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t1 >= 0 and t1 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t2 >= 0 and t2 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t3 >= 0 and t3 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t4 >= 0 and t4 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t5 >= 0 and t5 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t6 >= 0 and t6 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t8 = 'd1' or t8 = 'd2'")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t9 >= 0 and t9 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t10 >= 0 and t10 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t11 >= 0 and t11 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t12 >= 0 and t12 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t13 = 'b1' or t13 = 'b2'")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_insert_alltypes.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe db.stb")
|
||||
tdSql.checkRows(27)
|
||||
tdSql.checkData(0, 1, "TIMESTAMP")
|
||||
tdSql.checkData(1, 1, "INT")
|
||||
tdSql.checkData(2, 1, "BIGINT")
|
||||
tdSql.checkData(3, 1, "FLOAT")
|
||||
tdSql.checkData(4, 1, "DOUBLE")
|
||||
tdSql.checkData(5, 1, "SMALLINT")
|
||||
tdSql.checkData(6, 1, "TINYINT")
|
||||
tdSql.checkData(7, 1, "BOOL")
|
||||
tdSql.checkData(8, 1, "NCHAR")
|
||||
tdSql.checkData(8, 2, 32)
|
||||
tdSql.checkData(9, 1, "INT UNSIGNED")
|
||||
tdSql.checkData(10, 1, "BIGINT UNSIGNED")
|
||||
tdSql.checkData(11, 1, "TINYINT UNSIGNED")
|
||||
tdSql.checkData(12, 1, "SMALLINT UNSIGNED")
|
||||
tdSql.checkData(13, 1, "VARCHAR")
|
||||
tdSql.checkData(13, 2, 32)
|
||||
tdSql.checkData(14, 1, "NCHAR")
|
||||
tdSql.checkData(15, 1, "NCHAR")
|
||||
tdSql.checkData(16, 1, "NCHAR")
|
||||
tdSql.checkData(17, 1, "NCHAR")
|
||||
tdSql.checkData(18, 1, "NCHAR")
|
||||
tdSql.checkData(19, 1, "NCHAR")
|
||||
tdSql.checkData(20, 1, "NCHAR")
|
||||
tdSql.checkData(21, 1, "NCHAR")
|
||||
tdSql.checkData(22, 1, "NCHAR")
|
||||
tdSql.checkData(23, 1, "NCHAR")
|
||||
tdSql.checkData(24, 1, "NCHAR")
|
||||
tdSql.checkData(25, 1, "NCHAR")
|
||||
tdSql.checkData(26, 1, "NCHAR")
|
||||
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/rest_insert_alltypes.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe db.stb")
|
||||
tdSql.checkRows(29)
|
||||
tdSql.checkData(0, 1, "TIMESTAMP")
|
||||
tdSql.checkData(1, 1, "TIMESTAMP")
|
||||
tdSql.checkData(2, 1, "INT")
|
||||
tdSql.checkData(3, 1, "BIGINT")
|
||||
tdSql.checkData(4, 1, "FLOAT")
|
||||
tdSql.checkData(5, 1, "DOUBLE")
|
||||
tdSql.checkData(6, 1, "SMALLINT")
|
||||
tdSql.checkData(7, 1, "TINYINT")
|
||||
tdSql.checkData(8, 1, "BOOL")
|
||||
tdSql.checkData(9, 1, "NCHAR")
|
||||
tdSql.checkData(9, 2, 29)
|
||||
tdSql.checkData(10, 1, "INT UNSIGNED")
|
||||
tdSql.checkData(11, 1, "BIGINT UNSIGNED")
|
||||
tdSql.checkData(12, 1, "TINYINT UNSIGNED")
|
||||
tdSql.checkData(13, 1, "SMALLINT UNSIGNED")
|
||||
tdSql.checkData(14, 1, "VARCHAR")
|
||||
tdSql.checkData(14, 2, 23)
|
||||
tdSql.checkData(15, 1, "TIMESTAMP")
|
||||
tdSql.checkData(16, 1, "INT")
|
||||
tdSql.checkData(17, 1, "BIGINT")
|
||||
tdSql.checkData(18, 1, "FLOAT")
|
||||
tdSql.checkData(19, 1, "DOUBLE")
|
||||
tdSql.checkData(20, 1, "SMALLINT")
|
||||
tdSql.checkData(21, 1, "TINYINT")
|
||||
tdSql.checkData(22, 1, "BOOL")
|
||||
tdSql.checkData(23, 1, "NCHAR")
|
||||
tdSql.checkData(23, 2, 17)
|
||||
tdSql.checkData(24, 1, "INT UNSIGNED")
|
||||
tdSql.checkData(25, 1, "BIGINT UNSIGNED")
|
||||
tdSql.checkData(26, 1, "TINYINT UNSIGNED")
|
||||
tdSql.checkData(27, 1, "SMALLINT UNSIGNED")
|
||||
tdSql.checkData(28, 1, "VARCHAR")
|
||||
tdSql.checkData(28, 2, 19)
|
||||
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/stmt_insert_alltypes.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe db.stb")
|
||||
tdSql.checkRows(29)
|
||||
tdSql.checkData(0, 1, "TIMESTAMP")
|
||||
tdSql.checkData(1, 1, "TIMESTAMP")
|
||||
tdSql.checkData(2, 1, "INT")
|
||||
tdSql.checkData(3, 1, "BIGINT")
|
||||
tdSql.checkData(4, 1, "FLOAT")
|
||||
tdSql.checkData(5, 1, "DOUBLE")
|
||||
tdSql.checkData(6, 1, "SMALLINT")
|
||||
tdSql.checkData(7, 1, "TINYINT")
|
||||
tdSql.checkData(8, 1, "BOOL")
|
||||
tdSql.checkData(9, 1, "NCHAR")
|
||||
tdSql.checkData(9, 2, 29)
|
||||
tdSql.checkData(10, 1, "INT UNSIGNED")
|
||||
tdSql.checkData(11, 1, "BIGINT UNSIGNED")
|
||||
tdSql.checkData(12, 1, "TINYINT UNSIGNED")
|
||||
tdSql.checkData(13, 1, "SMALLINT UNSIGNED")
|
||||
tdSql.checkData(14, 1, "VARCHAR")
|
||||
tdSql.checkData(14, 2, 23)
|
||||
tdSql.checkData(15, 1, "TIMESTAMP")
|
||||
tdSql.checkData(16, 1, "INT")
|
||||
tdSql.checkData(17, 1, "BIGINT")
|
||||
tdSql.checkData(18, 1, "FLOAT")
|
||||
tdSql.checkData(19, 1, "DOUBLE")
|
||||
tdSql.checkData(20, 1, "SMALLINT")
|
||||
tdSql.checkData(21, 1, "TINYINT")
|
||||
tdSql.checkData(22, 1, "BOOL")
|
||||
tdSql.checkData(23, 1, "NCHAR")
|
||||
tdSql.checkData(23, 2, 17)
|
||||
tdSql.checkData(24, 1, "INT UNSIGNED")
|
||||
tdSql.checkData(25, 1, "BIGINT UNSIGNED")
|
||||
tdSql.checkData(26, 1, "TINYINT UNSIGNED")
|
||||
tdSql.checkData(27, 1, "SMALLINT UNSIGNED")
|
||||
tdSql.checkData(28, 1, "VARCHAR")
|
||||
tdSql.checkData(28, 2, 19)
|
||||
tdSql.query("select count(*) from db.stb where c0 >= 0 and c0 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c1 >= 0 and c1 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c2 >= 0 and c2 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c3 >= 0 and c3 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c4 >= 0 and c4 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c5 >= 0 and c5 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c6 >= 0 and c6 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c8 like 'd1%' or c8 like 'd2%'")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c9 >= 0 and c9 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c10 >= 0 and c10 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c11 >= 0 and c11 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c12 >= 0 and c12 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where c13 like 'b1%' or c13 like 'b2%'")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t0 >= 0 and t0 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t1 >= 0 and t1 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t2 >= 0 and t2 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t3 >= 0 and t3 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t4 >= 0 and t4 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t5 >= 0 and t5 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t6 >= 0 and t6 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t8 like 'd1%' or t8 like 'd2%'")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t9 >= 0 and t9 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t10 >= 0 and t10 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t11 >= 0 and t11 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t12 >= 0 and t12 <= 10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb where t13 like 'b1%' or t13 like 'b2%'")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,91 @@
|
|||
###################################################################
|
||||
# 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -F abc -P abc -I abc -T abc -H abc -i abc -S abc -B abc -r abc -t abc -n abc -l abc -w abc -w 16385 -R abc -O abc -a abc -n 2 -t 2 -r 1 -y" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from test.meters")
|
||||
tdSql.checkData(0, 0, 4)
|
||||
|
||||
cmd = "%s non_exist_opt" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
assert (os.system("%s" % cmd) != 0)
|
||||
|
||||
cmd = "%s -f non_exist_file -y" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
assert (os.system("%s" % cmd) != 0)
|
||||
|
||||
cmd = "%s -h non_exist_host -y" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
assert (os.system("%s" % cmd) != 0)
|
||||
|
||||
cmd = "%s -p non_exist_pass -y" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
assert (os.system("%s" % cmd) != 0)
|
||||
|
||||
cmd = "%s -u non_exist_user -y" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
assert (os.system("%s" % cmd) != 0)
|
||||
|
||||
cmd = "%s -c non_exist_dir -n 1 -t 1 -o non_exist_path -y" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
assert (os.system("%s" % cmd) == 0)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "taosc",
|
||||
"line_protocol": "line",
|
||||
"childtable_limit": -10,
|
||||
"childtable_offset": 10,
|
||||
"insert_rows": 20,
|
||||
"insert_interval": 0,
|
||||
"interlace_rows": 0,
|
||||
"disorder_ratio": 0,
|
||||
"disorder_range": 1000,
|
||||
"timestamp_step": 1,
|
||||
"start_timestamp": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"partial_col_num": 0,
|
||||
"columns": [{
|
||||
"type": "INT",
|
||||
"name": "first_type"
|
||||
}, {
|
||||
"type": "UINT",
|
||||
"name": "second_type",
|
||||
"count": 5
|
||||
},{
|
||||
"type": "double",
|
||||
"name": "third_type"
|
||||
},{
|
||||
"type": "float",
|
||||
"name": "forth_type",
|
||||
"count": 3
|
||||
}],
|
||||
"tags": [{
|
||||
"type": "INT",
|
||||
"name": "single"
|
||||
}, {
|
||||
"type": "UINT",
|
||||
"name": "multiple",
|
||||
"count": 5
|
||||
},{
|
||||
"type": "double",
|
||||
"name": "thensingle"
|
||||
},{
|
||||
"type": "float",
|
||||
"name": "thenmultiple",
|
||||
"count": 3
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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"
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
"childtable_prefix": "stb_",
|
||||
"columns": [{"type": "INT"}],
|
||||
"tags": [{"type": "INT"}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_pool_size": 10,
|
||||
"result_file": "./insert_res.txt",
|
||||
"confirm_parameter_prompt": "no",
|
||||
"prepared_rand": 100,
|
||||
"chinese": "no",
|
||||
"insert_interval": 0,
|
||||
"num_of_records_per_req": 10,
|
||||
"databases": [{
|
||||
"dbinfo": {
|
||||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"precision": "ns",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb3",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "yes",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "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": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
|
||||
"tags": [{"type": "TIMESTAMP"},{"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": "stb3-2",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb3-2_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "yes",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "rest",
|
||||
"line_protocol": "line",
|
||||
"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": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
|
||||
"tags": [{"type": "TIMESTAMP"},{"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}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ns",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "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": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "TIMESTAMP"},{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
|
||||
"tags": [{"type": "TIMESTAMP"},{"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}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"filetype":"query",
|
||||
"cfgdir": "/etc/taos",
|
||||
"confirm_parameter_prompt": "no",
|
||||
"databases": "db",
|
||||
"query_mode": "rest",
|
||||
"connection_pool_size": 10,
|
||||
"response_buffer": 10000,
|
||||
"specified_table_query":
|
||||
{
|
||||
"query_times": 1,
|
||||
"sqls":
|
||||
[{
|
||||
"sql": "select count(*) from db.stb",
|
||||
"result": "rest_query_specified"
|
||||
}]
|
||||
},
|
||||
"super_table_query": {
|
||||
"stblname": "stb",
|
||||
"sqls": [
|
||||
{
|
||||
"sql": "select count(*) from xxxx",
|
||||
"result": "rest_query_super"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_pool_size": 10,
|
||||
"result_file": "./insert_res.txt",
|
||||
"confirm_parameter_prompt": "no",
|
||||
"prepared_rand": 100,
|
||||
"chinese": "no",
|
||||
"insert_interval": 0,
|
||||
"num_of_records_per_req": 10,
|
||||
"databases": [{
|
||||
"dbinfo": {
|
||||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb4",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "yes",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "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": "stb4-2",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb4-2_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "yes",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"line_protocol": "line",
|
||||
"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": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "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}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_pool_size": 10,
|
||||
"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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "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}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"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",
|
||||
"line_protocol": "telnet",
|
||||
"childtable_limit": 0,
|
||||
"childtable_offset": 0,
|
||||
"insert_rows": 20,
|
||||
"insert_interval": 0,
|
||||
"interlace_rows": 5,
|
||||
"disorder_ratio": 30,
|
||||
"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",
|
||||
"line_protocol": "json",
|
||||
"childtable_limit": 0,
|
||||
"childtable_offset": 0,
|
||||
"insert_rows": 20,
|
||||
"insert_interval": 0,
|
||||
"interlace_rows": 5,
|
||||
"disorder_ratio": 60,
|
||||
"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": "BINARY", "len": 19, "count":1}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,254 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_pool_size": 10,
|
||||
"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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"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",
|
||||
"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": "BOOL"}],
|
||||
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"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",
|
||||
"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": "TINYINT"}],
|
||||
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "BINARY", "len": 19, "count":1}]
|
||||
},{
|
||||
"name": "stb3",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb3_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "SMALLINT"}],
|
||||
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "BINARY", "len": 19, "count":1}]
|
||||
},{
|
||||
"name": "stb4",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb4_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "BINARY", "len": 19, "count":1}]
|
||||
},{
|
||||
"name": "stb5",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb5_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "BIGINT"}],
|
||||
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "BINARY", "len": 19, "count":1}]
|
||||
},{
|
||||
"name": "stb6",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb6_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "FLOAT"}],
|
||||
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "BINARY", "len": 19, "count":1}]
|
||||
},{
|
||||
"name": "stb7",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb7_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "DOUBLE"}],
|
||||
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "BINARY", "len": 19, "count":1}]
|
||||
},{
|
||||
"name": "stb8",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb8_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "BINARY", "len": 8}],
|
||||
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "BINARY", "len": 19, "count":1}]
|
||||
},{
|
||||
"name": "stb9",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb9_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "NCHAR", "len": 8}],
|
||||
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "BINARY", "len": 19, "count":1}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096
|
||||
},
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,258 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096
|
||||
},
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096
|
||||
},
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,354 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_pool_size": 10,
|
||||
"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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"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",
|
||||
"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": "BOOL"}],
|
||||
"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",
|
||||
"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": "TINYINT"}],
|
||||
"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": "stb3",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb3_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "UTINYINT"}],
|
||||
"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": "stb4",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb4_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "SMALLINT"}],
|
||||
"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": "stb5",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb5_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "USMALLINT"}],
|
||||
"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": "stb6",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb6_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "stb7",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb7_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "UINT"}],
|
||||
"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": "stb8",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb8_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "BIGINT"}],
|
||||
"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": "stb9",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb9_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "UBIGINT"}],
|
||||
"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": "stb10",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb10_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "FLOAT"}],
|
||||
"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": "stb11",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb11_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "DOUBLE"}],
|
||||
"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": "stb12",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb12_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "BINARY", "len": 8}],
|
||||
"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": "stb13",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb13_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "sml",
|
||||
"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": "NCHAR", "len": 8}],
|
||||
"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}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"telnet_tcp_port": 6046,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"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",
|
||||
"tcp_transfer": "yes",
|
||||
"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",
|
||||
"tcp_transfer": "yes",
|
||||
"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}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"filetype": "subscribe",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"databases": "db",
|
||||
"confirm_parameter_prompt": "no",
|
||||
"specified_table_query": {
|
||||
"threads": 1,
|
||||
"mode": "async",
|
||||
"interval": 1000,
|
||||
"restart": "no",
|
||||
"keepProgress": "yes",
|
||||
"resubAfterConsume": 10,
|
||||
"endAfterConsume": 1,
|
||||
"sqls": [
|
||||
{
|
||||
"sql": "select * from stb;"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_pool_size": 10,
|
||||
"result_file": "./insert_res.txt",
|
||||
"confirm_parameter_prompt": "no",
|
||||
"prepared_rand": 100,
|
||||
"chinese": "no",
|
||||
"insert_interval": 0,
|
||||
"num_of_records_per_req": 10,
|
||||
"databases": [{
|
||||
"dbinfo": {
|
||||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"precision": "us",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb2",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "yes",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "stmt",
|
||||
"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": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
|
||||
"tags": [{"type": "TIMESTAMP"},{"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-2",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb2-2_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "yes",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "stmt",
|
||||
"line_protocol": "line",
|
||||
"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": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
|
||||
"tags": [{"type": "TIMESTAMP"},{"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}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "stmt",
|
||||
"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": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"partial_col_num": 999,
|
||||
"columns": [{"type": "TIMESTAMP","max": 10, "min": 0},{"type": "INT","max": 10, "min": 0}, {"type": "BIGINT","max": 10, "min": 0}, {"type": "FLOAT","max": 10, "min": 0}, {"type": "DOUBLE","max": 10, "min": 0}, {"type": "SMALLINT","max": 10, "min": 0}, {"type": "TINYINT","max": 10, "min": 0}, {"type": "BOOL","max": 10, "min": 0}, {"type": "NCHAR","len": 29, "count":1,
|
||||
"values": ["d1", "d2"]
|
||||
}, {"type": "UINT","max": 10, "min": 0}, {"type": "UBIGINT","max": 10, "min": 0}, {"type": "UTINYINT","max": 10, "min": 0}, {"type": "USMALLINT","max": 10, "min": 0}, {"type": "BINARY", "len": 23, "count":1,
|
||||
"values": ["b1","b2"]
|
||||
}],
|
||||
"tags": [{"type": "TIMESTAMP","max": 10, "min": 0},{"type": "INT","max": 10, "min": 0}, {"type": "BIGINT","max": 10, "min": 0}, {"type": "FLOAT","max": 10, "min": 0}, {"type": "DOUBLE","max": 10, "min": 0}, {"type": "SMALLINT","max": 10, "min": 0}, {"type": "TINYINT","max": 10, "min": 0}, {"type": "BOOL","max": 10, "min": 0}, {"type": "NCHAR","len": 17, "count":1,
|
||||
"values": ["d1", "d2"]
|
||||
}, {"type": "UINT","max": 10, "min": 0}, {"type": "UBIGINT","max": 10, "min": 0}, {"type": "UTINYINT","max": 10, "min": 0}, {"type": "USMALLINT","max": 10, "min": 0}, {"type": "BINARY", "len": 19, "count":1,
|
||||
"values": ["b1","b2"]
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"filetype": "subscribe",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"databases": "db",
|
||||
"confirm_parameter_prompt": "no",
|
||||
"super_table_query": {
|
||||
"stblname": "stb",
|
||||
"threads": 1,
|
||||
"mode": "sync",
|
||||
"interval": 1000,
|
||||
"restart": "yes",
|
||||
"keepProgress": "yes",
|
||||
"endAfterConsume": 1,
|
||||
"sqls": [
|
||||
{
|
||||
"sql": "select * from xxxx;"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_pool_size": 10,
|
||||
"result_file": "./insert_res.txt",
|
||||
"confirm_parameter_prompt": "no",
|
||||
"prepared_rand": 100,
|
||||
"chinese": "no",
|
||||
"insert_interval": 0,
|
||||
"num_of_records_per_req": 10,
|
||||
"databases": [{
|
||||
"dbinfo": {
|
||||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb1",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "yes",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "taosc",
|
||||
"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": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"partial_col_num": 5,
|
||||
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
|
||||
"tags": [{"type": "TIMESTAMP"},{"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": "stb1-2",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb1-2_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "yes",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "taosc",
|
||||
"line_protocol": "line",
|
||||
"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": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"partial_col_num": 5,
|
||||
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
|
||||
"tags": [{"type": "TIMESTAMP"},{"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}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "taosc",
|
||||
"line_protocol": "line",
|
||||
"childtable_limit": -10,
|
||||
"childtable_offset": 10,
|
||||
"insert_rows": 20,
|
||||
"insert_interval": 0,
|
||||
"interlace_rows": 0,
|
||||
"disorder_ratio": 0,
|
||||
"disorder_range": 1000,
|
||||
"timestamp_step": 1,
|
||||
"start_timestamp": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"partial_col_num": 999,
|
||||
"columns": [{"type": "TIMESTAMP","max": 10, "min": 0},{"type": "INT","max": 10, "min": 0}, {"type": "BIGINT","max": 10, "min": 0}, {"type": "FLOAT","max": 10, "min": 0}, {"type": "DOUBLE","max": 10, "min": 0}, {"type": "SMALLINT","max": 10, "min": 0}, {"type": "TINYINT","max": 10, "min": 0}, {"type": "BOOL","max": 10, "min": 0}, {"type": "NCHAR","len": 29, "count":1,
|
||||
"values": ["d1", "d2"]
|
||||
}, {"type": "UINT","max": 10, "min": 0}, {"type": "UBIGINT","max": 10, "min": 0}, {"type": "UTINYINT","max": 10, "min": 0}, {"type": "USMALLINT","max": 10, "min": 0}, {"type": "BINARY", "len": 23, "count":1,
|
||||
"values": ["b1","b2"]
|
||||
}],
|
||||
"tags": [{"type": "TIMESTAMP","max": 10, "min": 0},{"type": "INT","max": 10, "min": 0}, {"type": "BIGINT","max": 10, "min": 0}, {"type": "FLOAT","max": 10, "min": 0}, {"type": "DOUBLE","max": 10, "min": 0}, {"type": "SMALLINT","max": 10, "min": 0}, {"type": "TINYINT","max": 10, "min": 0}, {"type": "BOOL","max": 10, "min": 0}, {"type": "NCHAR","len": 17, "count":1,
|
||||
"values": ["d1", "d2"]
|
||||
}, {"type": "UINT","max": 10, "min": 0}, {"type": "UBIGINT","max": 10, "min": 0}, {"type": "UTINYINT","max": 10, "min": 0}, {"type": "USMALLINT","max": 10, "min": 0}, {"type": "BINARY", "len": 19, "count":1,
|
||||
"values": ["b1","b2"]
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "taosc",
|
||||
"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": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT"}],
|
||||
"tags": [{"type": "JSON", "len": 8, "count": 5}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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": "no",
|
||||
"replica": 1,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
"child_table_exists":"yes",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "taosc",
|
||||
"line_protocol": "line",
|
||||
"childtable_limit": 2,
|
||||
"childtable_offset": 0,
|
||||
"insert_rows": 20,
|
||||
"insert_interval": 0,
|
||||
"interlace_rows": 0,
|
||||
"disorder_ratio": 0,
|
||||
"disorder_range": 1000,
|
||||
"timestamp_step": 1,
|
||||
"start_timestamp": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"partial_col_num": 3,
|
||||
"columns": [{"type": "TIMESTAMP"},{"type": "INT", "len": 0}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
|
||||
"tags": [{"type": "TIMESTAMP"},{"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}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_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,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "yes",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "taosc",
|
||||
"line_protocol": "line",
|
||||
"childtable_limit": 0,
|
||||
"childtable_offset": 0,
|
||||
"insert_rows": 0,
|
||||
"insert_interval": 0,
|
||||
"interlace_rows": 0,
|
||||
"disorder_ratio": 0,
|
||||
"disorder_range": 1000,
|
||||
"timestamp_step": 1,
|
||||
"start_timestamp": "2020-10-01 00:00:00.000",
|
||||
"sample_file": "./sample.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "TIMESTAMP"},{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR"}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY"}],
|
||||
"tags": [{"type": "TIMESTAMP"},{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR"}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY"}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"filetype":"query",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "localhost",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"confirm_parameter_prompt": "no",
|
||||
"databases": "db",
|
||||
"query_times": 1,
|
||||
"reset_query_cache": "yes",
|
||||
"specified_table_query":
|
||||
{
|
||||
"query_interval": 1,
|
||||
"concurrent":1,
|
||||
"sqls":
|
||||
[{
|
||||
"sql": "select count(*) from db.stb",
|
||||
"result": "taosc_query_specified"
|
||||
}]
|
||||
},
|
||||
"super_table_query": {
|
||||
"stblname": "stb",
|
||||
"query_interval": 1,
|
||||
"concurrent": 1,
|
||||
"sqls": [
|
||||
{
|
||||
"sql": "select count(*) from xxxx",
|
||||
"result": "taosc_query_super"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"filetype": "insert",
|
||||
"cfgdir": "/etc/taos",
|
||||
"host": "127.0.0.1",
|
||||
"port": 6030,
|
||||
"user": "root",
|
||||
"password": "taosdata",
|
||||
"thread_count": 4,
|
||||
"connection_pool_size": 20,
|
||||
"result_file": "./insert_res.txt",
|
||||
"confirm_parameter_prompt": "no",
|
||||
"prepared_rand": 10,
|
||||
"chinese": "yes",
|
||||
"insert_interval": 0,
|
||||
"num_of_records_per_req": 10,
|
||||
"databases": [{
|
||||
"dbinfo": {
|
||||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb_",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
"data_source": "sample",
|
||||
"insert_mode": "taosc",
|
||||
"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": "./5-taos-tools/taosbenchmark/csv/sample_use_ts.csv",
|
||||
"use_sample_ts": "yes",
|
||||
"tags_file": "./5-taos-tools/taosbenchmark/csv/sample_tags.csv",
|
||||
"columns": [{"type": "INT"}],
|
||||
"tags": [{"type": "INT"}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
###################################################################
|
||||
# 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/taosc_json_tag.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe db.stb")
|
||||
tdSql.checkData(2, 0, "jtag")
|
||||
tdSql.checkData(2, 1, "JSON")
|
||||
tdSql.checkData(2, 3, "TAG")
|
||||
# 3.0 cannot distinct jtag
|
||||
#tdSql.query("select count(jtag) from db.stb")
|
||||
#tdSql.checkData(0, 0, 8)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,111 @@
|
|||
###################################################################
|
||||
# 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/taosc_only_create_table.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
tdSql.checkRows(0)
|
||||
tdSql.query("describe db.stb")
|
||||
tdSql.checkData(9, 1, "NCHAR")
|
||||
tdSql.checkData(14, 1, "VARCHAR")
|
||||
tdSql.checkData(23, 1, "NCHAR")
|
||||
tdSql.checkData(28, 1, "VARCHAR")
|
||||
tdSql.checkData(9, 2, 64)
|
||||
tdSql.checkData(14, 2, 64)
|
||||
tdSql.checkData(23, 2, 64)
|
||||
tdSql.checkData(28, 2, 64)
|
||||
|
||||
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/taosc_limit_offset.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
tdSql.checkData(0, 0, 40)
|
||||
tdSql.query("select distinct(c3) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c4) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c5) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c6) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c7) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c8) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c9) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c10) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c11) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c12) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.query("select distinct(c13) from db.stb")
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,127 @@
|
|||
###################################################################
|
||||
# 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 ast
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
from util.taosadapter 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tAdapter.init("")
|
||||
tAdapter.deploy()
|
||||
tAdapter.start()
|
||||
binPath = self.getPath()
|
||||
os.system("rm -f rest_query_specified-0 rest_query_super-0 taosc_query_specified-0 taosc_query_super-0")
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database if not exists db")
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute("create table stb (ts timestamp, c0 int) tags (t0 int)")
|
||||
tdSql.execute("insert into stb_0 using stb tags (0) values (now, 0)")
|
||||
tdSql.execute("insert into stb_1 using stb tags (1) values (now, 1)")
|
||||
tdSql.execute("insert into stb_2 using stb tags (2) values (now, 2)")
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/taosc_query.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
with open("%s" % "taosc_query_specified-0", 'r+') as f1:
|
||||
for line in f1.readlines():
|
||||
queryTaosc = line.strip().split()[0]
|
||||
assert queryTaosc == '3' , "result is %s != expect: 3" % queryTaosc
|
||||
|
||||
with open("%s" % "taosc_query_super-0", 'r+') as f1:
|
||||
for line in f1.readlines():
|
||||
queryTaosc = line.strip().split()[0]
|
||||
assert queryTaosc == '1', "result is %s != expect: 1" % queryTaosc
|
||||
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/rest_query.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
||||
times = 0
|
||||
with open("rest_query_super-0", 'r+') as f1:
|
||||
|
||||
for line in f1.readlines():
|
||||
contents = line.strip()
|
||||
if contents.find("data") != -1:
|
||||
pattern = re.compile("{.*}")
|
||||
contents = pattern.search(contents).group()
|
||||
contentsDict = ast.literal_eval(contents)
|
||||
queryResultRest = contentsDict['data'][0][0]
|
||||
assert queryResultRest == 1, "result is %s != expect: 1" % queryResultRest
|
||||
times += 1
|
||||
|
||||
assert times == 3, "result is %s != expect: 3" % times
|
||||
|
||||
|
||||
times = 0
|
||||
with open("rest_query_specified-0", 'r+') as f1:
|
||||
for line in f1.readlines():
|
||||
contents = line.strip()
|
||||
if contents.find("data") != -1:
|
||||
pattern = re.compile("{.*}")
|
||||
contents = pattern.search(contents).group()
|
||||
contentsDict = ast.literal_eval(contents)
|
||||
queryResultRest = contentsDict['data'][0][0]
|
||||
assert queryResultRest == 3, "result is %s != expect: 3" % queryResultRest
|
||||
times += 1
|
||||
|
||||
assert times == 1, "result is %s != expect: 1" % times
|
||||
|
||||
|
||||
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,78 @@
|
|||
###################################################################
|
||||
# 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/taosc_sample_use_ts.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
tdSql.checkData(0, 0, 24)
|
||||
tdSql.query("select * from db.stb_0")
|
||||
tdSql.checkRows(3)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(1, 1, 2)
|
||||
tdSql.checkData(2, 1, 3)
|
||||
tdSql.query("select distinct(t0) from db.stb")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 17)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,76 @@
|
|||
###################################################################
|
||||
# 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_interlace.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb1)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb2)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.stb1")
|
||||
result = tdSql.getData(0, 0)
|
||||
assert result <= 160, "result is %s > expect: 160" % result
|
||||
tdSql.query("select count(*) from db.stb2")
|
||||
result = tdSql.getData(0, 0)
|
||||
assert result <= 160, "result is %s > expect: 160" % result
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,104 @@
|
|||
###################################################################
|
||||
# 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_json_alltypes.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe db.stb1")
|
||||
tdSql.checkData(1, 1, "BOOL")
|
||||
tdSql.query("describe db.stb2")
|
||||
tdSql.checkData(1, 1, "TINYINT")
|
||||
tdSql.query("describe db.stb3")
|
||||
tdSql.checkData(1, 1, "SMALLINT")
|
||||
tdSql.query("describe db.stb4")
|
||||
tdSql.checkData(1, 1, "INT")
|
||||
tdSql.query("describe db.stb5")
|
||||
tdSql.checkData(1, 1, "BIGINT")
|
||||
tdSql.query("describe db.stb6")
|
||||
tdSql.checkData(1, 1, "FLOAT")
|
||||
tdSql.query("describe db.stb7")
|
||||
tdSql.checkData(1, 1, "DOUBLE")
|
||||
tdSql.query("describe db.stb8")
|
||||
tdSql.checkData(1, 1, "VARCHAR")
|
||||
tdSql.checkData(1, 2, 16)
|
||||
tdSql.query("describe db.stb9")
|
||||
tdSql.checkData(1, 1, "NCHAR")
|
||||
tdSql.checkData(1, 2, 16)
|
||||
tdSql.query("select count(*) from db.stb1")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb2")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb3")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb4")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb5")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb6")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb7")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb8")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb9")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,120 @@
|
|||
###################################################################
|
||||
# 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_telnet_alltypes.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("describe db.stb1")
|
||||
tdSql.checkData(1, 1, "BOOL")
|
||||
tdSql.query("describe db.stb2")
|
||||
tdSql.checkData(1, 1, "TINYINT")
|
||||
tdSql.query("describe db.stb3")
|
||||
tdSql.checkData(1, 1, "TINYINT UNSIGNED")
|
||||
tdSql.query("describe db.stb4")
|
||||
tdSql.checkData(1, 1, "SMALLINT")
|
||||
tdSql.query("describe db.stb5")
|
||||
tdSql.checkData(1, 1, "SMALLINT UNSIGNED")
|
||||
tdSql.query("describe db.stb6")
|
||||
tdSql.checkData(1, 1, "INT")
|
||||
tdSql.query("describe db.stb7")
|
||||
tdSql.checkData(1, 1, "INT UNSIGNED")
|
||||
tdSql.query("describe db.stb8")
|
||||
tdSql.checkData(1, 1, "BIGINT")
|
||||
tdSql.query("describe db.stb9")
|
||||
tdSql.checkData(1, 1, "BIGINT UNSIGNED")
|
||||
tdSql.query("describe db.stb10")
|
||||
tdSql.checkData(1, 1, "FLOAT")
|
||||
tdSql.query("describe db.stb11")
|
||||
tdSql.checkData(1, 1, "DOUBLE")
|
||||
tdSql.query("describe db.stb12")
|
||||
tdSql.checkData(1, 1, "VARCHAR")
|
||||
tdSql.checkData(1, 2, 16)
|
||||
tdSql.query("describe db.stb13")
|
||||
tdSql.checkData(1, 1, "NCHAR")
|
||||
tdSql.checkData(1, 2, 16)
|
||||
tdSql.query("select count(*) from db.stb1")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb2")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb3")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb4")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb5")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb6")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb7")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb8")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb9")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb10")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb11")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb12")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from db.stb13")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,119 @@
|
|||
###################################################################
|
||||
# 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 *
|
||||
from util.taosadapter 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tAdapter.init("")
|
||||
adapter_cfg = {
|
||||
"influxdb": {
|
||||
"enable": True
|
||||
},
|
||||
"opentsdb": {
|
||||
"enable": True
|
||||
},
|
||||
"opentsdb_telnet": {
|
||||
"enable": True,
|
||||
"maxTCPConnection": 250,
|
||||
"tcpKeepAlive": True,
|
||||
"dbs": ["opentsdb_telnet", "collectd", "icinga2", "tcollector"],
|
||||
"ports": [6046, 6047, 6048, 6049],
|
||||
"user": "root",
|
||||
"password": "taosdata"
|
||||
}
|
||||
}
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_rest_telnet.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(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(*) from (select distinct(tbname) from db.stb2)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db.stb2")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_rest_line.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(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(*) from (select distinct(tbname) from db2.stb2)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from db2.stb2")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_rest_json.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(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(*) from (select distinct(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())
|
|
@ -0,0 +1,97 @@
|
|||
###################################################################
|
||||
# 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
|
||||
import time
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
from util.taosadapter 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 getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tAdapter.init("")
|
||||
adapter_cfg = {
|
||||
"influxdb": {
|
||||
"enable": True
|
||||
},
|
||||
"opentsdb": {
|
||||
"enable": True
|
||||
},
|
||||
"opentsdb_telnet": {
|
||||
"enable": True,
|
||||
"maxTCPConnection": 250,
|
||||
"tcpKeepAlive": True,
|
||||
"dbs": ["opentsdb_telnet", "collectd", "icinga2", "tcollector"],
|
||||
"ports": [6046, 6047, 6048, 6049],
|
||||
"user": "root",
|
||||
"password": "taosdata"
|
||||
}
|
||||
}
|
||||
tAdapter.update_cfg(adapter_cfg)
|
||||
tAdapter.deploy()
|
||||
tAdapter.start()
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_telnet_tcp.json" %binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
time.sleep(5)
|
||||
tdSql.execute("reset query cache")
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from opentsdb_telnet.stb1)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from opentsdb_telnet.stb1")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
tdSql.query("select count(*) from (select distinct(tbname) from opentsdb_telnet.stb2)")
|
||||
tdSql.checkData(0, 0, 8)
|
||||
tdSql.query("select count(*) from opentsdb_telnet.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())
|
|
@ -0,0 +1,123 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-14544] taosdump data inspect
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ((tool) in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if (len(paths) == 0):
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 INT, c2 BOOL, c3 TINYINT, c4 SMALLINT, c5 BIGINT, c6 FLOAT, c7 DOUBLE, c8 TIMESTAMP, c9 BINARY(10), c10 NCHAR(10), c11 TINYINT UNSIGNED, c12 SMALLINT UNSIGNED, c13 INT UNSIGNED, c14 BIGINT UNSIGNED) tags(n1 INT, w2 BOOL, t3 TINYINT, t4 SMALLINT, t5 BIGINT, t6 FLOAT, t7 DOUBLE, t8 TIMESTAMP, t9 BINARY(10), t10 NCHAR(10), t11 TINYINT UNSIGNED, t12 SMALLINT UNSIGNED, t13 INT UNSIGNED, t14 BIGINT UNSIGNED)")
|
||||
tdSql.execute(
|
||||
"create table t1 using st tags(1, true, 1, 1, 1, 1.0, 1.0, 1, '1', '一', 1, 1, 1, 1)")
|
||||
tdSql.execute(
|
||||
"insert into t1 values(1640000000000, 1, true, 1, 1, 1, 1.0, 1.0, 1, '1', '一', 1, 1, 1, 1)")
|
||||
tdSql.execute(
|
||||
"create table t2 using st tags(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)")
|
||||
tdSql.execute(
|
||||
"insert into t2 values(1640000000000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
binPath = self.getPath("taosdump")
|
||||
if (binPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % binPath)
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%s --databases db -o %s -T 1" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
taosdumpInspectCmd = "%s -I %s/*.avro* -s | grep 'Schema:'|wc -l" % (
|
||||
binPath, self.tmpdir)
|
||||
schemaTimes = subprocess.check_output(
|
||||
taosdumpInspectCmd, shell=True).decode("utf-8")
|
||||
print("schema found times: %d" % int(schemaTimes))
|
||||
|
||||
if (int(schemaTimes) != 3):
|
||||
caller = inspect.getframeinfo(inspect.stack()[0][0])
|
||||
tdLog.exit(
|
||||
"%s(%d) failed: expected schema found times 3, actual %d" %
|
||||
(caller.filename, caller.lineno, int(schemaTimes)))
|
||||
|
||||
taosdumpInspectCmd = "%s -I %s/*.avro* | grep '=== Records:'|wc -l" % (
|
||||
binPath, self.tmpdir)
|
||||
recordsTimes = subprocess.check_output(
|
||||
taosdumpInspectCmd, shell=True).decode("utf-8")
|
||||
print("records found times: %d" % int(recordsTimes))
|
||||
|
||||
if (int(recordsTimes) != 3):
|
||||
caller = inspect.getframeinfo(inspect.stack()[0][0])
|
||||
tdLog.exit(
|
||||
"%s(%d) failed: expected records found times 3, actual %d" %
|
||||
(caller.filename, caller.lineno, int(recordsTimes)))
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,141 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports big int
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 BIGINT) tags(bntag BIGINT)")
|
||||
tdSql.execute("create table t1 using st tags(1)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(9223372036854775807)")
|
||||
tdSql.execute(
|
||||
"insert into t2 values(1640000000000, 9223372036854775807)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags(-9223372036854775807)")
|
||||
tdSql.execute(
|
||||
"insert into t3 values(1640000000000, -9223372036854775807)")
|
||||
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%staosdump --databases db -o %s -T 1" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where bntag = 1")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(0, 2, 1)
|
||||
|
||||
tdSql.query("select * from st where bntag = 9223372036854775807")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 9223372036854775807)
|
||||
tdSql.checkData(0, 2, 9223372036854775807)
|
||||
|
||||
tdSql.query("select * from st where bntag = -9223372036854775807")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, -9223372036854775807)
|
||||
tdSql.checkData(0, 2, -9223372036854775807)
|
||||
|
||||
tdSql.query("select * from st where bntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 0)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,127 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports binary
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 BINARY(5), c2 BINARY(5)) tags(btag BINARY(5))")
|
||||
tdSql.execute("create table t1 using st tags('test')")
|
||||
tdSql.execute("insert into t1 values(1640000000000, '01234', '56789')")
|
||||
tdSql.execute("insert into t1 values(1640000000001, 'abcd', 'efgh')")
|
||||
tdSql.execute("create table t2 using st tags(NULL)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, NULL, NULL)")
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system("%staosdump --databases db -o %s" % (binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(2)
|
||||
tdSql.checkData(0, 0, 't2')
|
||||
tdSql.checkData(1, 0, 't1')
|
||||
|
||||
tdSql.query("select btag from st where tbname = 't1'")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "test")
|
||||
|
||||
tdSql.query("select btag from st where tbname = 't2'")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select * from st where btag = 'test'")
|
||||
tdSql.checkRows(2)
|
||||
tdSql.checkData(0, 1, "01234")
|
||||
tdSql.checkData(0, 2, "56789")
|
||||
tdSql.checkData(1, 1, "abcd")
|
||||
tdSql.checkData(1, 2, "efgh")
|
||||
|
||||
tdSql.query("select * from st where btag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,130 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports bool
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 BOOL) tags(btag BOOL)")
|
||||
tdSql.execute("create table t1 using st tags(true)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, true)")
|
||||
tdSql.execute("create table t2 using st tags(false)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, false)")
|
||||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system("%staosdump --databases db -o %s" % (binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(3)
|
||||
tdSql.checkData(0, 0, 't3')
|
||||
tdSql.checkData(1, 0, 't2')
|
||||
tdSql.checkData(2, 0, 't1')
|
||||
|
||||
tdSql.query("select btag from st")
|
||||
tdSql.checkRows(3)
|
||||
tdSql.checkData(0, 0, "False")
|
||||
tdSql.checkData(1, 0, "True")
|
||||
tdSql.checkData(2, 0, None)
|
||||
|
||||
tdSql.query("select * from st where btag = 'true'")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 1, "True")
|
||||
tdSql.checkData(0, 2, "True")
|
||||
|
||||
tdSql.query("select * from st where btag = 'false'")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 1, "False")
|
||||
tdSql.checkData(0, 2, "False")
|
||||
|
||||
tdSql.query("select * from st where btag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,158 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
import math
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports double
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 DOUBLE) tags(dbtag DOUBLE)")
|
||||
tdSql.execute("create table t1 using st tags(1.0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1.0)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(1.7E308)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 1.7E308)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags(-1.7E308)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -1.7E308)")
|
||||
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%staosdump --databases db -o %s -T 1" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where dbtag = 1.0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), 1.0):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 1), 1.0))
|
||||
tdLog.exit("data is different")
|
||||
if not math.isclose(tdSql.getData(0, 2), 1.0):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 2), 1.0))
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where dbtag = 1.7E308")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), 1.7E308):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 1), 1.7E308))
|
||||
tdLog.exit("data is different")
|
||||
if not math.isclose(tdSql.getData(0, 2), 1.7E308):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 2), 1.7E308))
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where dbtag = -1.7E308")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), -1.7E308):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 1), -1.7E308))
|
||||
tdLog.exit("data is different")
|
||||
if not math.isclose(tdSql.getData(0, 2), -1.7E308):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 2), -1.7E308))
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where dbtag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 0)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,160 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
import math
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports float
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 FLOAT) tags(ftag FLOAT)")
|
||||
tdSql.execute("create table t1 using st tags(1.0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1.0)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(3.40E+38)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 3.40E+38)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags(-3.40E+38)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -3.40E+38)")
|
||||
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%staosdump --databases db -o %s -T 1" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where ftag = 1.0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), 1.0):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 1), 1.0))
|
||||
tdLog.exit("data is different")
|
||||
if not math.isclose(tdSql.getData(0, 2), 1.0):
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where ftag = 3.4E38")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), 3.4E38,
|
||||
rel_tol=1e-07, abs_tol=0.0):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 1), 3.4E38))
|
||||
tdLog.exit("data is different")
|
||||
if not math.isclose(tdSql.getData(0, 2), 3.4E38,
|
||||
rel_tol=1e-07, abs_tol=0.0):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 2), 3.4E38))
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where ftag = -3.4E38")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), (-3.4E38),
|
||||
rel_tol=1e-07, abs_tol=0.0):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 1), -3.4E38))
|
||||
tdLog.exit("data is different")
|
||||
if not math.isclose(tdSql.getData(0, 2), (-3.4E38),
|
||||
rel_tol=1e-07, abs_tol=0.0):
|
||||
tdLog.debug("getData(0, 1): %f, to compare %f" %
|
||||
(tdSql.getData(0, 2), -3.4E38))
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where ftag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 0)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,136 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports int
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 INT) tags(ntag INT)")
|
||||
tdSql.execute("create table t1 using st tags(1)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1)")
|
||||
tdSql.execute("create table t2 using st tags(2147483647)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 2147483647)")
|
||||
tdSql.execute("create table t3 using st tags(-2147483647)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -2147483647)")
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%staosdump --databases db -o %s -T 1" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where ntag = 1")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(0, 2, 1)
|
||||
|
||||
tdSql.query("select * from st where ntag = 2147483647")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 2147483647)
|
||||
tdSql.checkData(0, 2, 2147483647)
|
||||
|
||||
tdSql.query("select * from st where ntag = -2147483647")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, -2147483647)
|
||||
tdSql.checkData(0, 2, -2147483647)
|
||||
|
||||
tdSql.query("select * from st where ntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 0)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,128 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12362] taosdump supports JSON
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 int) tags(jtag JSON)")
|
||||
tdSql.execute(
|
||||
"create table t1 using st tags('{\"location\": \"beijing\"}')")
|
||||
tdSql.execute("insert into t1 values(1500000000000, 1)")
|
||||
|
||||
tdSql.execute(
|
||||
"create table t2 using st tags(NULL)")
|
||||
tdSql.execute("insert into t2 values(1500000000000, NULL)")
|
||||
|
||||
tdSql.execute(
|
||||
"create table t3 using st tags('')")
|
||||
tdSql.execute("insert into t3 values(1500000000000, 0)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system("%staosdump --databases db -o %s -g" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -g" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(3)
|
||||
tdSql.checkData(0, 0, 't3')
|
||||
|
||||
tdSql.query("select jtag->'location' from st")
|
||||
tdSql.checkRows(3)
|
||||
tdSql.checkData(0, 0, "\"beijing\"")
|
||||
|
||||
tdSql.query("select * from st where jtag contains 'location'")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(0, 2, '{\"location\":\"beijing\"}')
|
||||
|
||||
tdSql.query("select jtag from st")
|
||||
tdSql.checkRows(3)
|
||||
tdSql.checkData(0, 0, "{\"location\":\"beijing\"}")
|
||||
tdSql.checkData(1, 0, None)
|
||||
tdSql.checkData(2, 0, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,138 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports small int
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 SMALLINT) tags(sntag SMALLINT)")
|
||||
tdSql.execute("create table t1 using st tags(1)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(32767)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 32767)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags(-32767)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -32767)")
|
||||
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%staosdump --databases db -o %s -T 1" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where sntag = 1")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(0, 2, 1)
|
||||
|
||||
tdSql.query("select * from st where sntag = 32767")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 32767)
|
||||
tdSql.checkData(0, 2, 32767)
|
||||
|
||||
tdSql.query("select * from st where sntag = -32767")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, -32767)
|
||||
tdSql.checkData(0, 2, -32767)
|
||||
|
||||
tdSql.query("select * from st where sntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 0)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,138 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports tiny int
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 TINYINT) tags(tntag TINYINT)")
|
||||
tdSql.execute("create table t1 using st tags(1)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(127)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 127)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags(-127)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -127)")
|
||||
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%staosdump --databases db -o %s -T 1" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where tntag = 1")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(0, 2, 1)
|
||||
|
||||
tdSql.query("select * from st where tntag = 127")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 127)
|
||||
tdSql.checkData(0, 2, 127)
|
||||
|
||||
tdSql.query("select * from st where tntag = -127")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, -127)
|
||||
tdSql.checkData(0, 2, -127)
|
||||
|
||||
tdSql.query("select * from st where tntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 0)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,128 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12655] taosdump supports unsigned big int
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 BIGINT UNSIGNED) tags(ubntag BIGINT UNSIGNED)")
|
||||
tdSql.execute("create table t1 using st tags(0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table t2 using st tags(18446744073709551614)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 18446744073709551614)")
|
||||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%staosdump --databases db -o %s -T 1 -g" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
tdSql.query("select * from st where ubntag = 0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 0)
|
||||
tdSql.checkData(0, 2, 0)
|
||||
|
||||
tdSql.query("select * from st where ubntag = 18446744073709551614")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 18446744073709551614)
|
||||
tdSql.checkData(0, 2, 18446744073709551614)
|
||||
|
||||
tdSql.query("select * from st where ubntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 0)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,128 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports unsigned int
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 INT UNSIGNED) tags(untag INT UNSIGNED)")
|
||||
tdSql.execute("create table t1 using st tags(0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table t2 using st tags(4294967294)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 4294967294)")
|
||||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%staosdump --databases db -o %s -T 1 -g" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
tdSql.query("select * from st where untag = 0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 0)
|
||||
tdSql.checkData(0, 2, 0)
|
||||
|
||||
tdSql.query("select * from st where untag = 4294967294")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 4294967294)
|
||||
tdSql.checkData(0, 2, 4294967294)
|
||||
|
||||
tdSql.query("select * from st where untag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 0)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,128 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports unsigned small int
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 SMALLINT UNSIGNED) tags(usntag SMALLINT UNSIGNED)")
|
||||
tdSql.execute("create table t1 using st tags(0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table t2 using st tags(65534)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 65534)")
|
||||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%staosdump --databases db -o %s -T 1 -g" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
tdSql.query("select * from st where usntag = 0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 0)
|
||||
tdSql.checkData(0, 2, 0)
|
||||
|
||||
tdSql.query("select * from st where usntag = 65534")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 65534)
|
||||
tdSql.checkData(0, 2, 65534)
|
||||
|
||||
tdSql.query("select * from st where usntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 0)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,128 @@
|
|||
###################################################################
|
||||
# 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 sys
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def caseDescription(self):
|
||||
'''
|
||||
case1<sdsang>: [TD-12526] taosdump supports unsigned tiny int
|
||||
'''
|
||||
return
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getBuildPath(self):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
else:
|
||||
projPath = selfPath[:selfPath.find("tests")]
|
||||
|
||||
buildPath = ""
|
||||
for root, dirs, files in os.walk(projPath):
|
||||
if ("taosdump" in files):
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if ("packaging" not in rootRealPath):
|
||||
buildPath = root[:len(root) - len("/build/bin")]
|
||||
break
|
||||
return buildPath
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 TINYINT UNSIGNED) tags(utntag TINYINT UNSIGNED)")
|
||||
tdSql.execute("create table t1 using st tags(0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table t2 using st tags(254)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 254)")
|
||||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
buildPath = self.getBuildPath()
|
||||
if (buildPath == ""):
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
tdLog.info("taosdump found in %s" % buildPath)
|
||||
binPath = buildPath + "/build/bin/"
|
||||
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
else:
|
||||
print("directory exists")
|
||||
os.system("rm -rf %s" % self.tmpdir)
|
||||
os.makedirs(self.tmpdir)
|
||||
|
||||
os.system(
|
||||
"%staosdump --databases db -o %s -T 1 -g" %
|
||||
(binPath, self.tmpdir))
|
||||
|
||||
# sys.exit(1)
|
||||
tdSql.execute("drop database db")
|
||||
|
||||
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
||||
|
||||
tdSql.query("show databases")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'st')
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
tdSql.query("select * from st where utntag = 0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 0)
|
||||
tdSql.checkData(0, 2, 0)
|
||||
|
||||
tdSql.query("select * from st where utntag = 254")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 254)
|
||||
tdSql.checkData(0, 2, 254)
|
||||
|
||||
tdSql.query("select * from st where utntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 0)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
python3 ./test.py -f 5-taos-tools/taosbenchmark/auto_create_table_json.py
|
||||
#python3 ./test.py -f 5-taos-tools/taosbenchmark/commandline.py
|
||||
python3 ./test.py -f 5-taos-tools/taosbenchmark/custom_col_tag.py
|
||||
python3 ./test.py -f 5-taos-tools/taosbenchmark/default_json.py
|
||||
python3 ./test.py -f 5-taos-tools/taosbenchmark/demo.py
|
||||
python3 ./test.py -f 5-taos-tools/taosbenchmark/insert_alltypes_json.py
|
||||
python3 ./test.py -f 5-taos-tools/taosbenchmark/invalid_commandline.py
|
||||
python3 ./test.py -f 5-taos-tools/taosbenchmark/json_tag.py
|
||||
#python3 ./test.py -f 5-taos-tools/taosbenchmark/limit_offset_json.py
|
||||
python3 ./test.py -f 5-taos-tools/taosbenchmark/query_json.py
|
||||
python3 ./test.py -f 5-taos-tools/taosbenchmark/sample_csv_json.py
|
||||
#python3 ./test.py -f 5-taos-tools/taosbenchmark/sml_interlace.py
|
||||
python3 ./test.py -f 5-taos-tools/taosbenchmark/sml_json_alltypes.py
|
||||
#python3 ./test.py -f 5-taos-tools/taosbenchmark/sml_telnet_alltypes.py
|
||||
#python3 ./test.py -f 5-taos-tools/taosbenchmark/taosadapter_json.py
|
||||
#python3 ./test.py -f 5-taos-tools/taosbenchmark/telnet_tcp.py
|
|
@ -0,0 +1,496 @@
|
|||
#!/usr/bin/python
|
||||
###################################################################
|
||||
# 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
|
||||
#
|
||||
###################################################################
|
||||
# install pip
|
||||
# pip install src/connector/python/
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
import getopt
|
||||
import subprocess
|
||||
import time
|
||||
import base64
|
||||
import json
|
||||
import platform
|
||||
import socket
|
||||
import threading
|
||||
|
||||
import toml
|
||||
sys.path.append("../pytest")
|
||||
from util.log import *
|
||||
from util.dnodes import *
|
||||
from util.cases import *
|
||||
from util.cluster import *
|
||||
from util.taosadapter import *
|
||||
|
||||
import taos
|
||||
import taosrest
|
||||
|
||||
def checkRunTimeError():
|
||||
import win32gui
|
||||
timeCount = 0
|
||||
while 1:
|
||||
time.sleep(1)
|
||||
timeCount = timeCount + 1
|
||||
print("checkRunTimeError",timeCount)
|
||||
if (timeCount>600):
|
||||
print("stop the test.")
|
||||
os.system("TASKKILL /F /IM taosd.exe")
|
||||
os.system("TASKKILL /F /IM taos.exe")
|
||||
os.system("TASKKILL /F /IM tmq_sim.exe")
|
||||
os.system("TASKKILL /F /IM mintty.exe")
|
||||
os.system("TASKKILL /F /IM python.exe")
|
||||
quit(0)
|
||||
hwnd = win32gui.FindWindow(None, "Microsoft Visual C++ Runtime Library")
|
||||
if hwnd:
|
||||
os.system("TASKKILL /F /IM taosd.exe")
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
fileName = "all"
|
||||
deployPath = ""
|
||||
masterIp = ""
|
||||
testCluster = False
|
||||
valgrind = 0
|
||||
killValgrind = 1
|
||||
logSql = True
|
||||
stop = 0
|
||||
restart = False
|
||||
dnodeNums = 1
|
||||
mnodeNums = 0
|
||||
updateCfgDict = {}
|
||||
adapter_cfg_dict = {}
|
||||
execCmd = ""
|
||||
queryPolicy = 1
|
||||
createDnodeNums = 1
|
||||
restful = False
|
||||
opts, args = getopt.gnu_getopt(sys.argv[1:], 'f:p:m:l:scghrd:k:e:N:M:Q:C:RD:', [
|
||||
'file=', 'path=', 'master', 'logSql', 'stop', 'cluster', 'valgrind', 'help', 'restart', 'updateCfgDict', 'killv', 'execCmd','dnodeNums','mnodeNums','queryPolicy','createDnodeNums','restful','adaptercfgupdate'])
|
||||
for key, value in opts:
|
||||
if key in ['-h', '--help']:
|
||||
tdLog.printNoPrefix(
|
||||
'A collection of test cases written using Python')
|
||||
tdLog.printNoPrefix('-f Name of test case file written by Python')
|
||||
tdLog.printNoPrefix('-p Deploy Path for Simulator')
|
||||
tdLog.printNoPrefix('-m Master Ip for Simulator')
|
||||
tdLog.printNoPrefix('-l <True:False> logSql Flag')
|
||||
tdLog.printNoPrefix('-s stop All dnodes')
|
||||
tdLog.printNoPrefix('-c Test Cluster Flag')
|
||||
tdLog.printNoPrefix('-g valgrind Test Flag')
|
||||
tdLog.printNoPrefix('-r taosd restart test')
|
||||
tdLog.printNoPrefix('-d update cfg dict, base64 json str')
|
||||
tdLog.printNoPrefix('-k not kill valgrind processer')
|
||||
tdLog.printNoPrefix('-e eval str to run')
|
||||
tdLog.printNoPrefix('-N start dnodes numbers in clusters')
|
||||
tdLog.printNoPrefix('-M create mnode numbers in clusters')
|
||||
tdLog.printNoPrefix('-Q set queryPolicy in one dnode')
|
||||
tdLog.printNoPrefix('-C create Dnode Numbers in one cluster')
|
||||
tdLog.printNoPrefix('-R restful realization form')
|
||||
tdLog.printNoPrefix('-D taosadapter update cfg dict ')
|
||||
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
if key in ['-r', '--restart']:
|
||||
restart = True
|
||||
|
||||
if key in ['-f', '--file']:
|
||||
fileName = value
|
||||
|
||||
if key in ['-p', '--path']:
|
||||
deployPath = value
|
||||
|
||||
if key in ['-m', '--master']:
|
||||
masterIp = value
|
||||
|
||||
if key in ['-l', '--logSql']:
|
||||
if (value.upper() == "TRUE"):
|
||||
logSql = True
|
||||
elif (value.upper() == "FALSE"):
|
||||
logSql = False
|
||||
else:
|
||||
tdLog.printNoPrefix("logSql value %s is invalid" % logSql)
|
||||
sys.exit(0)
|
||||
|
||||
if key in ['-c', '--cluster']:
|
||||
testCluster = True
|
||||
|
||||
if key in ['-g', '--valgrind']:
|
||||
valgrind = 1
|
||||
|
||||
if key in ['-s', '--stop']:
|
||||
stop = 1
|
||||
|
||||
if key in ['-d', '--updateCfgDict']:
|
||||
try:
|
||||
updateCfgDict = eval(base64.b64decode(value.encode()).decode())
|
||||
except:
|
||||
print('updateCfgDict convert fail.')
|
||||
sys.exit(0)
|
||||
|
||||
if key in ['-k', '--killValgrind']:
|
||||
killValgrind = 0
|
||||
|
||||
if key in ['-e', '--execCmd']:
|
||||
try:
|
||||
execCmd = base64.b64decode(value.encode()).decode()
|
||||
except:
|
||||
print('execCmd run fail.')
|
||||
sys.exit(0)
|
||||
|
||||
if key in ['-N', '--dnodeNums']:
|
||||
dnodeNums = value
|
||||
|
||||
if key in ['-M', '--mnodeNums']:
|
||||
mnodeNums = value
|
||||
|
||||
if key in ['-Q', '--queryPolicy']:
|
||||
queryPolicy = value
|
||||
|
||||
if key in ['-C', '--createDnodeNums']:
|
||||
createDnodeNums = value
|
||||
|
||||
if key in ['-R', '--restful']:
|
||||
restful = True
|
||||
|
||||
if key in ['-D', '--adaptercfgupdate']:
|
||||
try:
|
||||
adaptercfgupdate = eval(base64.b64decode(value.encode()).decode())
|
||||
except:
|
||||
print('adapter cfg update convert fail.')
|
||||
sys.exit(0)
|
||||
|
||||
if not execCmd == "":
|
||||
if restful:
|
||||
tAdapter.init(deployPath)
|
||||
else:
|
||||
tdDnodes.init(deployPath)
|
||||
print(execCmd)
|
||||
exec(execCmd)
|
||||
quit()
|
||||
|
||||
if (stop != 0):
|
||||
if (valgrind == 0):
|
||||
toBeKilled = "taosd"
|
||||
else:
|
||||
toBeKilled = "valgrind.bin"
|
||||
|
||||
killCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}' | xargs kill -TERM > /dev/null 2>&1" % toBeKilled
|
||||
|
||||
psCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}'" % toBeKilled
|
||||
processID = subprocess.check_output(psCmd, shell=True)
|
||||
|
||||
while(processID):
|
||||
os.system(killCmd)
|
||||
time.sleep(1)
|
||||
processID = subprocess.check_output(psCmd, shell=True)
|
||||
|
||||
for port in range(6030, 6041):
|
||||
usePortPID = "lsof -i tcp:%d | grep LISTEn | awk '{print $2}'" % port
|
||||
processID = subprocess.check_output(usePortPID, shell=True)
|
||||
|
||||
if processID:
|
||||
killCmd = "kill -TERM %s" % processID
|
||||
os.system(killCmd)
|
||||
fuserCmd = "fuser -k -n tcp %d" % port
|
||||
os.system(fuserCmd)
|
||||
if valgrind:
|
||||
time.sleep(2)
|
||||
|
||||
if restful:
|
||||
toBeKilled = "taosadapter"
|
||||
|
||||
killCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}' | xargs kill -TERM > /dev/null 2>&1" % toBeKilled
|
||||
|
||||
psCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}'" % toBeKilled
|
||||
processID = subprocess.check_output(psCmd, shell=True)
|
||||
|
||||
while(processID):
|
||||
os.system(killCmd)
|
||||
time.sleep(1)
|
||||
processID = subprocess.check_output(psCmd, shell=True)
|
||||
|
||||
for port in range(6030, 6041):
|
||||
usePortPID = "lsof -i tcp:%d | grep LISTEn | awk '{print $2}'" % port
|
||||
processID = subprocess.check_output(usePortPID, shell=True)
|
||||
|
||||
if processID:
|
||||
killCmd = "kill -TERM %s" % processID
|
||||
os.system(killCmd)
|
||||
fuserCmd = "fuser -k -n tcp %d" % port
|
||||
os.system(fuserCmd)
|
||||
|
||||
tdLog.info('stop taosadapter')
|
||||
|
||||
tdLog.info('stop All dnodes')
|
||||
|
||||
if masterIp == "":
|
||||
host = socket.gethostname()
|
||||
else:
|
||||
try:
|
||||
config = eval(masterIp)
|
||||
host = config["host"]
|
||||
except Exception as r:
|
||||
host = masterIp
|
||||
|
||||
tdLog.info("Procedures for tdengine deployed in %s" % (host))
|
||||
if platform.system().lower() == 'windows':
|
||||
fileName = fileName.replace("/", os.sep)
|
||||
if (masterIp == "" and not fileName == "0-others\\udf_create.py"):
|
||||
threading.Thread(target=checkRunTimeError,daemon=True).start()
|
||||
tdLog.info("Procedures for testing self-deployment")
|
||||
tdDnodes.init(deployPath, masterIp)
|
||||
tdDnodes.setTestCluster(testCluster)
|
||||
tdDnodes.setValgrind(valgrind)
|
||||
tdDnodes.stopAll()
|
||||
key_word = 'tdCases.addWindows'
|
||||
is_test_framework = 0
|
||||
try:
|
||||
if key_word in open(fileName, encoding='UTF-8').read():
|
||||
is_test_framework = 1
|
||||
except Exception as r:
|
||||
print(r)
|
||||
updateCfgDictStr = ''
|
||||
# adapter_cfg_dict_str = ''
|
||||
if is_test_framework:
|
||||
moduleName = fileName.replace(".py", "").replace(os.sep, ".")
|
||||
uModule = importlib.import_module(moduleName)
|
||||
try:
|
||||
ucase = uModule.TDTestCase()
|
||||
if ((json.dumps(updateCfgDict) == '{}') and hasattr(ucase, 'updatecfgDict')):
|
||||
updateCfgDict = ucase.updatecfgDict
|
||||
updateCfgDictStr = "-d %s"%base64.b64encode(json.dumps(updateCfgDict).encode()).decode()
|
||||
if ((json.dumps(adapter_cfg_dict) == '{}') and hasattr(ucase, 'taosadapter_cfg_dict')):
|
||||
adapter_cfg_dict = ucase.taosadapter_cfg_dict
|
||||
# adapter_cfg_dict_str = f"-D {base64.b64encode(toml.dumps(adapter_cfg_dict).encode()).decode()}"
|
||||
except Exception as r:
|
||||
print(r)
|
||||
else:
|
||||
pass
|
||||
if restful:
|
||||
tAdapter.init(deployPath, masterIp)
|
||||
tAdapter.stop(force_kill=True)
|
||||
|
||||
if dnodeNums == 1 :
|
||||
tdDnodes.deploy(1,updateCfgDict)
|
||||
tdDnodes.start(1)
|
||||
tdCases.logSql(logSql)
|
||||
if restful:
|
||||
tAdapter.deploy(adapter_cfg_dict)
|
||||
tAdapter.start()
|
||||
|
||||
if queryPolicy != 1:
|
||||
queryPolicy=int(queryPolicy)
|
||||
if restful:
|
||||
conn = taosrest.connect(url=f"http://{host}:6041")
|
||||
else:
|
||||
conn = taos.connect(host,config=tdDnodes.getSimCfgPath())
|
||||
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("create qnode on dnode 1")
|
||||
cursor.execute(f'alter local "queryPolicy" "{queryPolicy}"')
|
||||
cursor.execute("show local variables")
|
||||
res = cursor.fetchall()
|
||||
for i in range(cursor.rowcount):
|
||||
if res[i][0] == "queryPolicy" :
|
||||
if int(res[i][1]) == int(queryPolicy):
|
||||
tdLog.success(f'alter queryPolicy to {queryPolicy} successfully')
|
||||
else:
|
||||
tdLog.debug(res)
|
||||
tdLog.exit(f"alter queryPolicy to {queryPolicy} failed")
|
||||
else :
|
||||
tdLog.debug("create an cluster with %s nodes and make %s dnode as independent mnode"%(dnodeNums,mnodeNums))
|
||||
dnodeslist = cluster.configure_cluster(dnodeNums=dnodeNums,mnodeNums=mnodeNums)
|
||||
tdDnodes = ClusterDnodes(dnodeslist)
|
||||
tdDnodes.init(deployPath, masterIp)
|
||||
tdDnodes.setTestCluster(testCluster)
|
||||
tdDnodes.setValgrind(valgrind)
|
||||
tdDnodes.stopAll()
|
||||
for dnode in tdDnodes.dnodes:
|
||||
tdDnodes.deploy(dnode.index,{})
|
||||
for dnode in tdDnodes.dnodes:
|
||||
tdDnodes.starttaosd(dnode.index)
|
||||
tdCases.logSql(logSql)
|
||||
|
||||
if restful:
|
||||
tAdapter.deploy(adapter_cfg_dict)
|
||||
tAdapter.start()
|
||||
|
||||
if not restful:
|
||||
conn = taos.connect(host,config=tdDnodes.getSimCfgPath())
|
||||
else:
|
||||
conn = taosrest.connect(url=f"http://{host}:6041")
|
||||
# tdLog.info(tdDnodes.getSimCfgPath(),host)
|
||||
if createDnodeNums == 1:
|
||||
createDnodeNums=dnodeNums
|
||||
else:
|
||||
createDnodeNums=createDnodeNums
|
||||
cluster.create_dnode(conn,createDnodeNums)
|
||||
try:
|
||||
if cluster.check_dnode(conn) :
|
||||
print("check dnode ready")
|
||||
except Exception as r:
|
||||
print(r)
|
||||
if ucase is not None and hasattr(ucase, 'noConn') and ucase.noConn == True:
|
||||
conn = None
|
||||
else:
|
||||
if not restful:
|
||||
conn = taos.connect(host="%s"%(host), config=tdDnodes.sim.getCfgDir())
|
||||
else:
|
||||
conn = taosrest.connect(url=f"http://{host}:6041")
|
||||
if is_test_framework:
|
||||
tdCases.runOneWindows(conn, fileName)
|
||||
else:
|
||||
tdCases.runAllWindows(conn)
|
||||
else:
|
||||
tdDnodes.setKillValgrind(killValgrind)
|
||||
tdDnodes.init(deployPath, masterIp)
|
||||
tdDnodes.setTestCluster(testCluster)
|
||||
tdDnodes.setValgrind(valgrind)
|
||||
tdDnodes.stopAll()
|
||||
is_test_framework = 0
|
||||
key_word = 'tdCases.addLinux'
|
||||
try:
|
||||
if key_word in open(fileName).read():
|
||||
is_test_framework = 1
|
||||
except:
|
||||
pass
|
||||
if is_test_framework:
|
||||
moduleName = fileName.replace(".py", "").replace("/", ".")
|
||||
uModule = importlib.import_module(moduleName)
|
||||
try:
|
||||
ucase = uModule.TDTestCase()
|
||||
if (json.dumps(updateCfgDict) == '{}'):
|
||||
updateCfgDict = ucase.updatecfgDict
|
||||
if (json.dumps(adapter_cfg_dict) == '{}'):
|
||||
adapter_cfg_dict = ucase.taosadapter_cfg_dict
|
||||
except:
|
||||
pass
|
||||
|
||||
if restful:
|
||||
tAdapter.init(deployPath, masterIp)
|
||||
tAdapter.stop(force_kill=True)
|
||||
|
||||
if dnodeNums == 1 :
|
||||
tdDnodes.deploy(1,updateCfgDict)
|
||||
tdDnodes.start(1)
|
||||
tdCases.logSql(logSql)
|
||||
|
||||
if restful:
|
||||
tAdapter.deploy(adapter_cfg_dict)
|
||||
tAdapter.start()
|
||||
|
||||
if queryPolicy != 1:
|
||||
queryPolicy=int(queryPolicy)
|
||||
if not restful:
|
||||
conn = taos.connect(host,config=tdDnodes.getSimCfgPath())
|
||||
else:
|
||||
conn = taosrest.connect(url=f"http://{host}:6041")
|
||||
# tdSql.init(conn.cursor())
|
||||
# tdSql.execute("create qnode on dnode 1")
|
||||
# tdSql.execute('alter local "queryPolicy" "%d"'%queryPolicy)
|
||||
# tdSql.query("show local variables;")
|
||||
# for i in range(tdSql.queryRows):
|
||||
# if tdSql.queryResult[i][0] == "queryPolicy" :
|
||||
# if int(tdSql.queryResult[i][1]) == int(queryPolicy):
|
||||
# tdLog.success('alter queryPolicy to %d successfully'%queryPolicy)
|
||||
# else :
|
||||
# tdLog.debug(tdSql.queryResult)
|
||||
# tdLog.exit("alter queryPolicy to %d failed"%queryPolicy)
|
||||
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("create qnode on dnode 1")
|
||||
cursor.execute(f'alter local "queryPolicy" "{queryPolicy}"')
|
||||
cursor.execute("show local variables")
|
||||
res = cursor.fetchall()
|
||||
for i in range(cursor.rowcount):
|
||||
if res[i][0] == "queryPolicy" :
|
||||
if int(res[i][1]) == int(queryPolicy):
|
||||
tdLog.success(f'alter queryPolicy to {queryPolicy} successfully')
|
||||
else:
|
||||
tdLog.debug(res)
|
||||
tdLog.exit(f"alter queryPolicy to {queryPolicy} failed")
|
||||
|
||||
else :
|
||||
tdLog.debug("create an cluster with %s nodes and make %s dnode as independent mnode"%(dnodeNums,mnodeNums))
|
||||
dnodeslist = cluster.configure_cluster(dnodeNums=dnodeNums,mnodeNums=mnodeNums)
|
||||
tdDnodes = ClusterDnodes(dnodeslist)
|
||||
tdDnodes.init(deployPath, masterIp)
|
||||
tdDnodes.setTestCluster(testCluster)
|
||||
tdDnodes.setValgrind(valgrind)
|
||||
tdDnodes.stopAll()
|
||||
for dnode in tdDnodes.dnodes:
|
||||
tdDnodes.deploy(dnode.index,{})
|
||||
for dnode in tdDnodes.dnodes:
|
||||
tdDnodes.starttaosd(dnode.index)
|
||||
tdCases.logSql(logSql)
|
||||
|
||||
if restful:
|
||||
tAdapter.deploy(adapter_cfg_dict)
|
||||
tAdapter.start()
|
||||
|
||||
if not restful:
|
||||
conn = taos.connect(host,config=tdDnodes.getSimCfgPath())
|
||||
else:
|
||||
conn = taosrest.connect(url=f"http://{host}:6041")
|
||||
print(tdDnodes.getSimCfgPath(),host)
|
||||
if createDnodeNums == 1:
|
||||
createDnodeNums=dnodeNums
|
||||
else:
|
||||
createDnodeNums=createDnodeNums
|
||||
cluster.create_dnode(conn,createDnodeNums)
|
||||
try:
|
||||
if cluster.check_dnode(conn) :
|
||||
print("check dnode ready")
|
||||
except Exception as r:
|
||||
print(r)
|
||||
|
||||
|
||||
if testCluster:
|
||||
tdLog.info("Procedures for testing cluster")
|
||||
if fileName == "all":
|
||||
tdCases.runAllCluster()
|
||||
else:
|
||||
tdCases.runOneCluster(fileName)
|
||||
else:
|
||||
tdLog.info("Procedures for testing self-deployment")
|
||||
if not restful:
|
||||
conn = taos.connect(host,config=tdDnodes.getSimCfgPath())
|
||||
else:
|
||||
conn = taosrest.connect(url=f"http://{host}:6041")
|
||||
|
||||
if fileName == "all":
|
||||
tdCases.runAllLinux(conn)
|
||||
else:
|
||||
tdCases.runOneLinux(conn, fileName)
|
||||
|
||||
if restart:
|
||||
if fileName == "all":
|
||||
tdLog.info("not need to query ")
|
||||
else:
|
||||
sp = fileName.rsplit(".", 1)
|
||||
if len(sp) == 2 and sp[1] == "py":
|
||||
tdDnodes.stopAll()
|
||||
tdDnodes.start(1)
|
||||
time.sleep(1)
|
||||
if not restful:
|
||||
conn = taos.connect( host, config=tdDnodes.getSimCfgPath())
|
||||
else:
|
||||
conn = taosrest.connect(url=f"http://{host}:6041")
|
||||
tdLog.info("Procedures for tdengine deployed in %s" % (host))
|
||||
tdLog.info("query test after taosd restart")
|
||||
tdCases.runOneLinux(conn, sp[0] + "_" + "restart.py")
|
||||
else:
|
||||
tdLog.info("not need to query")
|
||||
|
||||
if conn is not None:
|
||||
conn.close()
|
||||
sys.exit(0)
|
|
@ -40,6 +40,7 @@ else
|
|||
fi
|
||||
cat ../script/jenkins/basic.txt |grep -v "^#"|grep -v "^$"|sed "s/^/,,script,/" >>$case_file
|
||||
grep "^python" ../system-test/fulltest.sh |sed "s/^/,,system-test,/" >>$case_file
|
||||
grep "^python" ../develop-test/fulltest.sh |sed "s/^/,,develop-test,/" >>$case_file
|
||||
|
||||
# tar source code for run.sh to use
|
||||
# if [ $ent -eq 0 ]; then
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db1",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 3650,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db2",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 3650,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -15,17 +15,17 @@
|
|||
"drop": "no",
|
||||
"replica": 1,
|
||||
"days": 2,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db3",
|
||||
"drop": "yes",
|
||||
"replica": 2,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
|
|
|
@ -17,19 +17,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
|
|
|
@ -17,19 +17,19 @@
|
|||
"name": "db",
|
||||
"drop": "no",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
|
|
|
@ -17,19 +17,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
|
|
|
@ -17,19 +17,19 @@
|
|||
"name": "db",
|
||||
"drop": "no",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
|
|
|
@ -17,19 +17,19 @@
|
|||
"name": "db",
|
||||
"drop": "no",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
"name": "db01",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"update": 0,
|
||||
,
|
||||
"maxtablesPerVnode": 1000
|
||||
},
|
||||
"super_tables": [{
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "testdb3",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 3600,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "testdb1",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ns",
|
||||
"keep": 3600,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "testdb2",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "us",
|
||||
"keep": 3600,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "nsdb",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ns",
|
||||
"keep": 3600,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "subnsdb",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ns",
|
||||
"keep": 3600,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "nsdb2",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ns",
|
||||
"keep": 3600,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "nsdbcsv",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ns",
|
||||
"keep": 3600,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 36500,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "json",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb_old",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -17,19 +17,19 @@
|
|||
"name": "db",
|
||||
"drop": "no",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 3650,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
|
|
|
@ -17,19 +17,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 3650,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,18 +18,18 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
"update": 1
|
||||
},
|
||||
"super_tables": [{
|
||||
|
|
|
@ -18,18 +18,18 @@
|
|||
"name": "db",
|
||||
"drop": "no",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
"update": 1
|
||||
},
|
||||
"super_tables": [{
|
||||
|
|
|
@ -18,18 +18,18 @@
|
|||
"name": "dbno",
|
||||
"drop": "no",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
"update": 1
|
||||
},
|
||||
"super_tables": [{
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "no",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,18 +18,18 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 8,
|
||||
|
||||
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
"update": 1
|
||||
},
|
||||
"super_tables": [{
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "dbtest123",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
"name": "db",
|
||||
"drop": "yes",
|
||||
"replica": 1,
|
||||
"days": 10,
|
||||
|
||||
"cache": 50,
|
||||
"blocks": 8,
|
||||
|
||||
"precision": "ms",
|
||||
"keep": 365,
|
||||
"minRows": 100,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
"cachelast":0,
|
||||
"quorum":1,
|
||||
"fsync":3000,
|
||||
"update": 0
|
||||
"comp":2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"super_tables": [{
|
||||
"name": "stb0",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue