Skip to content

Commit

Permalink
fix: taosbenchmark stmt + csv rework for develop (taosdata#17196)
Browse files Browse the repository at this point in the history
* fix: taosbenchmark stmt + csv rework for develop

* fix: update taos-tools 85179e9

* test: fix default_json.py to align with doc
  • Loading branch information
sangshuduo authored Oct 6, 2022
1 parent 97ec403 commit f8a1d27
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/kit/taos-tools
Submodule taos-tools updated 95 files
+1 −1 .github/workflows/3.0-taosdump-release-ws.yml
+1 −0 .gitignore
+15 −14 inc/bench.h
+2 −2 inc/benchData.h
+11 −2 inc/toolsdef.h
+12 −15 src/benchCommandOpt.c
+31 −25 src/benchData.c
+321 −90 src/benchInsert.c
+14 −12 src/benchJsonOpt.c
+0 −3 src/benchMain.c
+0 −3 src/benchQuery.c
+0 −3 src/benchSubscribe.c
+0 −3 src/benchTmq.c
+8 −11 src/benchUtil.c
+108 −143 src/taosdump.c
+0 −3 src/toolstime.c
+70 −57 tests/taosbenchmark/commandline.py
+3 −0 tests/taosbenchmark/csv/sample_no_ts.csv
+14 −15 tests/taosbenchmark/custom_col_tag.py
+16 −16 tests/taosbenchmark/default_json.py
+0 −1 tests/taosbenchmark/demo.py
+0 −340 tests/taosbenchmark/insert_alltypes_json.py
+27 −25 tests/taosbenchmark/invalid_commandline.py
+48 −0 tests/taosbenchmark/json/stmt_sample_doesnt_use_ts.json
+48 −0 tests/taosbenchmark/json/stmt_sample_use_ts.json
+2 −0 tests/taosbenchmark/json/taosc_auto_create_table.json
+1 −0 tests/taosbenchmark/json/taosc_insert_alltypes.json
+14 −15 tests/taosbenchmark/json_tag.py
+15 −17 tests/taosbenchmark/limit_offset_json.py
+31 −30 tests/taosbenchmark/query_json.py
+78 −0 tests/taosbenchmark/rest_auto_create_table_json.py
+110 −0 tests/taosbenchmark/rest_insert_alltypes_json.py
+78 −0 tests/taosbenchmark/sml_auto_create_table_json.py
+107 −0 tests/taosbenchmark/sml_insert_alltypes_json.py
+2 −3 tests/taosbenchmark/sml_interlace.py
+2 −3 tests/taosbenchmark/sml_json_alltypes.py
+2 −3 tests/taosbenchmark/sml_telnet_alltypes.py
+78 −0 tests/taosbenchmark/stmt_auto_create_table_json.py
+165 −0 tests/taosbenchmark/stmt_insert_alltypes_json.py
+81 −0 tests/taosbenchmark/stmt_sample_csv_json.py
+81 −0 tests/taosbenchmark/stmt_sample_csv_json_doesnt_use_ts.py
+16 −17 tests/taosbenchmark/taosadapter_json.py
+29 −51 tests/taosbenchmark/taosc_auto_create_table_json.py
+170 −0 tests/taosbenchmark/taosc_insert_alltypes_json.py
+14 −15 tests/taosbenchmark/taosc_sample_csv_json.py
+2 −3 tests/taosbenchmark/telnet_tcp.py
+15 −19 tests/taosbenchmark/ws/websocket.py
+3 −4 tests/taosdump/native/taosdumpDbNtb.py
+3 −4 tests/taosdump/native/taosdumpDbStb.py
+3 −4 tests/taosdump/native/taosdumpManyCols.py
+3 −4 tests/taosdump/native/taosdumpTestBasic.py
+3 −4 tests/taosdump/native/taosdumpTestInspect.py
+3 −4 tests/taosdump/native/taosdumpTestTypeBigInt.py
+4 −5 tests/taosdump/native/taosdumpTestTypeBinary.py
+3 −4 tests/taosdump/native/taosdumpTestTypeBool.py
+3 −4 tests/taosdump/native/taosdumpTestTypeDouble.py
+3 −4 tests/taosdump/native/taosdumpTestTypeFloat.py
+3 −4 tests/taosdump/native/taosdumpTestTypeInt.py
+3 −4 tests/taosdump/native/taosdumpTestTypeJson.py
+3 −4 tests/taosdump/native/taosdumpTestTypeSmallInt.py
+3 −4 tests/taosdump/native/taosdumpTestTypeTinyInt.py
+3 −4 tests/taosdump/native/taosdumpTestTypeUnsignedBigInt.py
+3 −4 tests/taosdump/native/taosdumpTestTypeUnsignedInt.py
+3 −4 tests/taosdump/native/taosdumpTestTypeUnsignedSmallInt.py
+3 −4 tests/taosdump/native/taosdumpTestTypeUnsignedTinyInt.py
+2 −2 tests/taosdump/old/taosdumpTest.py
+2 −2 tests/taosdump/old/taosdumpTest2.py
+2 −2 tests/taosdump/old/taosdumpTestNanoSupport.py
+3 −4 tests/taosdump/ws/taosdumpTestTypeBigInt.py
+4 −5 tests/taosdump/ws/taosdumpTestTypeBinary.py
+3 −4 tests/taosdump/ws/taosdumpTestTypeBool.py
+3 −4 tests/taosdump/ws/taosdumpTestTypeDouble.py
+3 −4 tests/taosdump/ws/taosdumpTestTypeFloat.py
+3 −4 tests/taosdump/ws/taosdumpTestTypeInt.py
+3 −4 tests/taosdump/ws/taosdumpTestTypeJson.py
+2 −3 tests/taosdump/ws/taosdumpTestTypeSmallInt.py
+2 −3 tests/taosdump/ws/taosdumpTestTypeTinyInt.py
+2 −3 tests/taosdump/ws/taosdumpTestTypeUnsignedBigInt.py
+2 −3 tests/taosdump/ws/taosdumpTestTypeUnsignedInt.py
+2 −3 tests/taosdump/ws/taosdumpTestTypeUnsignedSmallInt.py
+2 −3 tests/taosdump/ws/taosdumpTestTypeUnsignedTinyInt.py
+3 −4 tests/taosdump/ws3/taosdumpTestTypeBigInt.py
+4 −5 tests/taosdump/ws3/taosdumpTestTypeBinary.py
+3 −4 tests/taosdump/ws3/taosdumpTestTypeBool.py
+3 −4 tests/taosdump/ws3/taosdumpTestTypeDouble.py
+3 −4 tests/taosdump/ws3/taosdumpTestTypeFloat.py
+3 −4 tests/taosdump/ws3/taosdumpTestTypeInt.py
+3 −4 tests/taosdump/ws3/taosdumpTestTypeJson.py
+2 −3 tests/taosdump/ws3/taosdumpTestTypeSmallInt.py
+2 −3 tests/taosdump/ws3/taosdumpTestTypeTinyInt.py
+2 −3 tests/taosdump/ws3/taosdumpTestTypeUnsignedBigInt.py
+2 −3 tests/taosdump/ws3/taosdumpTestTypeUnsignedInt.py
+2 −3 tests/taosdump/ws3/taosdumpTestTypeUnsignedSmallInt.py
+2 −3 tests/taosdump/ws3/taosdumpTestTypeUnsignedTinyInt.py
+56 −47 tests/test.py
24 changes: 12 additions & 12 deletions tests/develop-test/5-taos-tools/taosbenchmark/default_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@

class TDTestCase:
def caseDescription(self):
'''
"""
[TD-11510] taosBenchmark test cases
'''
return
"""

def init(self, conn, logSql):
tdLog.debug("start to execute %s" % __file__)
Expand All @@ -31,19 +30,19 @@ def init(self, conn, logSql):
def getPath(self, tool="taosBenchmark"):
selfPath = os.path.dirname(os.path.realpath(__file__))

if ("community" in selfPath):
projPath = selfPath[:selfPath.find("community")]
if "community" in selfPath:
projPath = selfPath[: selfPath.find("community")]
else:
projPath = selfPath[:selfPath.find("tests")]
projPath = selfPath[: selfPath.find("tests")]

paths = []
for root, dirs, files in os.walk(projPath):
if ((tool) in files):
if (tool) in files:
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
if "packaging" not in rootRealPath:
paths.append(os.path.join(root, tool))
break
if (len(paths) == 0):
if len(paths) == 0:
tdLog.exit("taosBenchmark not found!")
return
else:
Expand All @@ -52,19 +51,20 @@ def getPath(self, tool="taosBenchmark"):

def run(self):
binPath = self.getPath()
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/default.json" %binPath
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(tbname) from db.stb")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from db.stb")
tdSql.checkData(0, 0, 100)
if len(tdSql.queryResult):
tdLog.exit("query result is %d" % len(tdSql.queryResult))

def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)


tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase())

0 comments on commit f8a1d27

Please sign in to comment.