From 4fdf9ae5ced5f8ea005cc03275b36410ffdcb40d Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Sat, 15 Jul 2023 10:21:50 +0800 Subject: [PATCH] test: add performance test , sma need quick no sma four multiple --- tests/system-test/0-others/timeRangeWise.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/system-test/0-others/timeRangeWise.py b/tests/system-test/0-others/timeRangeWise.py index a49457c8e9..a7dc18aa82 100644 --- a/tests/system-test/0-others/timeRangeWise.py +++ b/tests/system-test/0-others/timeRangeWise.py @@ -83,7 +83,7 @@ class TDTestCase: value += f"{self.ts})" # move next 1s interval - self.ts += 100 + self.ts += 1 return value @@ -148,7 +148,7 @@ class TDTestCase: self.vgroups2 = 4 self.db1 = "db1" # no sma self.db2 = "db2" # have sma - self.smaClause = "interval(1h)" + self.smaClause = "interval(10s)" # total self.c1Cnt = 0 @@ -254,10 +254,11 @@ class TDTestCase: return False # warning performance - diff = (spend2 - spend1)*100/spend1 - tdLog.info("spend1=%.6fs spend2=%.6fs diff=%.1f%%"%(spend1, spend2, diff)) - if spend2 > spend1 and diff > 20: - tdLog.info("warning: the diff for performance after spliting is over 20%") + multiple = spend1/spend2 + tdLog.info("spend1=%.6fs spend2=%.6fs multiple=%.1f"%(spend1, spend2, multiple)) + if spend2 > spend1 and multiple < 4: + tdLog.info(f"performace not reached: multiple(spend1/spend)={multiple} require is >=4 ") + return False return True -- GitLab