feat: support query-QPS new feature
This commit is contained in:
parent
a336671de6
commit
dca0822b5d
|
@ -134,8 +134,6 @@ def getMatch(datatype, algo):
|
||||||
|
|
||||||
|
|
||||||
def generateJsonFile(algo):
|
def generateJsonFile(algo):
|
||||||
print(f"doTest algo: {algo} \n")
|
|
||||||
|
|
||||||
# replace datatype
|
# replace datatype
|
||||||
context = readFileContext(templateFile)
|
context = readFileContext(templateFile)
|
||||||
# replace compress
|
# replace compress
|
||||||
|
@ -192,8 +190,6 @@ def findContextValue(context, label):
|
||||||
ends = [',','}',']', 0]
|
ends = [',','}',']', 0]
|
||||||
while context[end] not in ends:
|
while context[end] not in ends:
|
||||||
end += 1
|
end += 1
|
||||||
|
|
||||||
print(f"start = {start} end={end}\n")
|
|
||||||
return context[start:end]
|
return context[start:end]
|
||||||
|
|
||||||
|
|
||||||
|
@ -281,10 +277,10 @@ def testQuery():
|
||||||
# INFO: Spend 6.7350 second completed total queries: 10, the QPS of all threads: 1.485
|
# INFO: Spend 6.7350 second completed total queries: 10, the QPS of all threads: 1.485
|
||||||
speed = None
|
speed = None
|
||||||
|
|
||||||
for i in range(20, len(lines)):
|
for i in range(0, len(lines)):
|
||||||
# find second real
|
# find second real
|
||||||
|
context = lines[i]
|
||||||
pos = context.find("the QPS of all threads:")
|
pos = context.find("the QPS of all threads:")
|
||||||
context = lines[26]
|
|
||||||
if pos == -1 :
|
if pos == -1 :
|
||||||
continue
|
continue
|
||||||
pos += 24
|
pos += 24
|
||||||
|
@ -302,7 +298,6 @@ def doTest(algo, resultFile):
|
||||||
print(f"doTest algo: {algo} \n")
|
print(f"doTest algo: {algo} \n")
|
||||||
#cleanAndStartTaosd()
|
#cleanAndStartTaosd()
|
||||||
|
|
||||||
|
|
||||||
# json
|
# json
|
||||||
jsonFile = generateJsonFile(algo)
|
jsonFile = generateJsonFile(algo)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue