diff --git a/.gitignore b/.gitignore index 5cef144671d75a9c7f5ddee06a20adb5e749242e..e5c5c072c508669022c156122fd09187ebbefca8 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ compile_commands.json /tools/*.install.fail/ /.vscode/ /*.xlsx + diff --git a/testcase/hackbench/hackbench-args-sched.csv b/testcase/hackbench/hackbench-args-sched.csv new file mode 100644 index 0000000000000000000000000000000000000000..28c407b41186024c1f7395edb759067814c919ab --- /dev/null +++ b/testcase/hackbench/hackbench-args-sched.csv @@ -0,0 +1,41 @@ +工具名称,子系统,权重,--fds=,--groups=,--datasize=,--loops=,mode,ipc +hackbench,sched,0.104801,1,3,100,500000,process,pipe +hackbench,sched,0.104801,1,3,100,500000,process,socket +hackbench,sched,0.104801,1,3,100,500000,thread,pipe +hackbench,sched,0.104801,1,3,100,500000,thread,socket +hackbench,sched,0.064904,1,9,100,500000,process,pipe +hackbench,sched,0.064904,1,9,100,500000,process,socket +hackbench,sched,0.064904,1,9,100,500000,thread,pipe +hackbench,sched,0.064904,1,9,100,500000,thread,socket +hackbench,sched,0.034818,1,16,100,500000,process,pipe +hackbench,sched,0.034818,1,16,100,500000,process,socket +hackbench,sched,0.034818,1,16,100,500000,thread,pipe +hackbench,sched,0.034818,1,16,100,500000,thread,socket +hackbench,sched,0.019003,1,22,100,500000,process,pipe +hackbench,sched,0.019003,1,22,100,500000,process,socket +hackbench,sched,0.019003,1,22,100,500000,thread,pipe +hackbench,sched,0.019003,1,22,100,500000,thread,socket +hackbench,sched,0.010617,1,30,100,500000,process,pipe +hackbench,sched,0.010617,1,30,100,500000,process,socket +hackbench,sched,0.010617,1,30,100,500000,thread,pipe +hackbench,sched,0.010617,1,30,100,500000,thread,socket +hackbench,sched,0.006726,1,36,100,500000,process,pipe +hackbench,sched,0.006726,1,36,100,500000,process,socket +hackbench,sched,0.006726,1,36,100,500000,thread,pipe +hackbench,sched,0.006726,1,36,100,500000,thread,socket +hackbench,sched,0.003729,1,43,100,500000,process,pipe +hackbench,sched,0.003729,1,43,100,500000,process,socket +hackbench,sched,0.003729,1,43,100,500000,thread,pipe +hackbench,sched,0.003729,1,43,100,500000,thread,socket +hackbench,sched,0.001972,1,49,100,500000,process,pipe +hackbench,sched,0.001972,1,49,100,500000,process,socket +hackbench,sched,0.001972,1,49,100,500000,thread,pipe +hackbench,sched,0.001972,1,49,100,500000,thread,socket +hackbench,sched,0.001084,1,56,100,500000,process,pipe +hackbench,sched,0.001084,1,56,100,500000,process,socket +hackbench,sched,0.001084,1,56,100,500000,thread,pipe +hackbench,sched,0.001084,1,56,100,500000,thread,socket +hackbench,sched,0.000791,1,63,100,500000,process,pipe +hackbench,sched,0.000791,1,63,100,500000,process,socket +hackbench,sched,0.000791,1,63,100,500000,thread,pipe +hackbench,sched,0.000791,1,63,100,500000,thread,socket diff --git a/testcase/hackbench/hackbench-tune.csv b/testcase/hackbench/hackbench-tune.csv new file mode 100644 index 0000000000000000000000000000000000000000..ad44f2be0e133f1432b4e9b23b21dcb9e3590083 --- /dev/null +++ b/testcase/hackbench/hackbench-tune.csv @@ -0,0 +1,42 @@ +# hackbench 用例稳定性参数配置 +# 格式: 用例名称,warmup,run_loop,result_select_percent +tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-moprocess,1,10,80 +tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-mothread,1,10,80 +tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-mothread,1,10,80 diff --git a/testcase/hackbench/hackbench.py b/testcase/hackbench/hackbench.py new file mode 100644 index 0000000000000000000000000000000000000000..56dd9f1f17f3f7ccc502f8ae941897faf0863fc4 --- /dev/null +++ b/testcase/hackbench/hackbench.py @@ -0,0 +1,70 @@ +#!/usr/bin/python3 +# coding: utf-8 +# Desc: hackbench 工具类,供 parse-csv2case.py 通用框架调用 +# +# 内部委托给 lib.ts_common.PerfRTTestsHackBench,确保生成的 case +# 与老 case (tperf-rt-tests-hackbench-*.py) 行为完全一致。 +# +# CSV 参数列名与 __init__ 参数名的对应关系: +# --fds= → fds → nr_fds +# --groups= → groups → nr_group +# --datasize= → datasize → data_size +# --loops= → loops → nr_loop +# mode → mode → use_thread (thread=True, process=False) +# ipc → ipc → use_pipe (pipe=True), use_inet (inet=True) + +import os +import sys + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) + +from common.lib.benchmark import TSTPerf # noqa: E402 +from lib.ts_common import PerfRTTestsHackBench # noqa: E402 + + +class PerfHackBench(TSTPerf): + """hackbench 工具类 — 委托给 PerfRTTestsHackBench + + 接收 parse-csv2case.py 传入的 CSV 字符串参数, + 内部创建 PerfRTTestsHackBench 实例并委托所有操作。 + """ + + def __init__( + self, + tc_name: str, + fds: str = "20", + groups: str = "10", + datasize: str = "100", + loops: str = "500000", + mode: str = "process", + ipc: str = "pipe", + ): + super().__init__() + self._impl = PerfRTTestsHackBench( + name=tc_name, + nr_fds=int(fds), + nr_group=int(groups), + data_size=int(datasize), + nr_loop=int(loops), + use_thread=(mode == "thread"), + use_pipe=(ipc == "pipe"), + use_inet=(ipc == "inet"), + sched_fifo=False, + ) + + def prepare(self): + return self._impl.prepare() + + def benchmark(self): + return self._impl.benchmark() + + def parse_test_data(self): + return self._impl.parse_test_data() + + def cleanup(self): + return self._impl.cleanup() diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..c34d3e822e66e9f2ecad7af629e52dc97c15f537 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 2829a1c122b20119 + @用例名称: tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=16,datasize=100,loops=500000,mode=process,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="16", + datasize="100", + loops="500000", + mode="process", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=16,datasize=100,loops=500000,mode=process,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..af26a38fc33081a6a3271d20a257f0b45f1a4f32 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: c58ee01b4fd5c1e3 + @用例名称: tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=16,datasize=100,loops=500000,mode=thread,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="16", + datasize="100", + loops="500000", + mode="thread", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=16,datasize=100,loops=500000,mode=thread,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..7b925cb2f3ceb9c3ea5b9a62078e468f9791a550 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 446ae3d73f36d3df + @用例名称: tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=16,datasize=100,loops=500000,mode=process,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="16", + datasize="100", + loops="500000", + mode="process", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=16,datasize=100,loops=500000,mode=process,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..ee624314f0e587aa1171dd57465851fe2eb5659f --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 27f95feebdc38e0c + @用例名称: tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=16,datasize=100,loops=500000,mode=thread,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="16", + datasize="100", + loops="500000", + mode="thread", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=16,datasize=100,loops=500000,mode=thread,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..ba7ae0c1e42c9fd8c591489e0afe0eaf363e95fe --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 895e4b2a529fcaed + @用例名称: tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=22,datasize=100,loops=500000,mode=process,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="22", + datasize="100", + loops="500000", + mode="process", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=22,datasize=100,loops=500000,mode=process,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..e5e5802a0b6bebe2066119465dd6bdbb90d3e881 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 25b87d9e228e02b2 + @用例名称: tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=22,datasize=100,loops=500000,mode=thread,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="22", + datasize="100", + loops="500000", + mode="thread", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=22,datasize=100,loops=500000,mode=thread,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..222372faed07bc33f80568baaa56d000a6f71de4 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: f71627a910685787 + @用例名称: tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=22,datasize=100,loops=500000,mode=process,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="22", + datasize="100", + loops="500000", + mode="process", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=22,datasize=100,loops=500000,mode=process,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..519995528056b9aa3f8fefc75a0e019e298d353c --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 95df61ea896224a5 + @用例名称: tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=22,datasize=100,loops=500000,mode=thread,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="22", + datasize="100", + loops="500000", + mode="thread", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=22,datasize=100,loops=500000,mode=thread,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..c78f13867c4ad127febc460e4f4bf20bfa963d76 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 3de4750eda7f7ca3 + @用例名称: tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=3,datasize=100,loops=500000,mode=process,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="3", + datasize="100", + loops="500000", + mode="process", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=3,datasize=100,loops=500000,mode=process,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..b05d1f47cb00c2dcaea317331e7d31e3f28e55a3 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7e303bb8b287ce4b + @用例名称: tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=3,datasize=100,loops=500000,mode=thread,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="3", + datasize="100", + loops="500000", + mode="thread", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=3,datasize=100,loops=500000,mode=thread,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..6b9bd67c5f98d65521ee245d2576a1776d3ce0f8 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 8d98b285d8a4cb61 + @用例名称: tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=3,datasize=100,loops=500000,mode=process,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="3", + datasize="100", + loops="500000", + mode="process", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=3,datasize=100,loops=500000,mode=process,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..847938da0592e98b2757e83bfb207c422efd523b --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 5f29f6036db61e67 + @用例名称: tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=3,datasize=100,loops=500000,mode=thread,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="3", + datasize="100", + loops="500000", + mode="thread", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=3,datasize=100,loops=500000,mode=thread,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..68f32e0f1923183761cdb681eed5feab12b88c24 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 79d28c58c845618b + @用例名称: tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=30,datasize=100,loops=500000,mode=process,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="30", + datasize="100", + loops="500000", + mode="process", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=30,datasize=100,loops=500000,mode=process,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..ac4a7fbb5d46c31e89b22092e00b5c5c3da0f42e --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 703b2882d53583d0 + @用例名称: tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=30,datasize=100,loops=500000,mode=thread,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="30", + datasize="100", + loops="500000", + mode="thread", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=30,datasize=100,loops=500000,mode=thread,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..771ebc31ce402276c5282da559a61c361bd42d50 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 660a190e0f258a59 + @用例名称: tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=30,datasize=100,loops=500000,mode=process,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="30", + datasize="100", + loops="500000", + mode="process", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=30,datasize=100,loops=500000,mode=process,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..c0528d429993a36b0675bba790ed563c4e089d7a --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 643431c18ecede7c + @用例名称: tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=30,datasize=100,loops=500000,mode=thread,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="30", + datasize="100", + loops="500000", + mode="thread", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=30,datasize=100,loops=500000,mode=thread,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..3eadc8553106ecae866568e9fd4c0fc4adbffacc --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: d2d518b99cd6bc08 + @用例名称: tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=36,datasize=100,loops=500000,mode=process,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="36", + datasize="100", + loops="500000", + mode="process", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=36,datasize=100,loops=500000,mode=process,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..960ae2b3acb11d57d2c2a13a443c35f338579180 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 31f441ebb9d2f4f1 + @用例名称: tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=36,datasize=100,loops=500000,mode=thread,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="36", + datasize="100", + loops="500000", + mode="thread", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=36,datasize=100,loops=500000,mode=thread,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..450973da2a1a348797da92a5014505bcd90dd263 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 0d6856f591d1b7fe + @用例名称: tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=36,datasize=100,loops=500000,mode=process,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="36", + datasize="100", + loops="500000", + mode="process", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=36,datasize=100,loops=500000,mode=process,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..3688c0320b4406deefa474716932cf41f8b7ae37 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 0a7d7013bf1c1015 + @用例名称: tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=36,datasize=100,loops=500000,mode=thread,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="36", + datasize="100", + loops="500000", + mode="thread", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=36,datasize=100,loops=500000,mode=thread,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..7ee6e046c3b5e3a9d56b391731ae701aaa394c9c --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 71d283b3a22e664b + @用例名称: tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=43,datasize=100,loops=500000,mode=process,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="43", + datasize="100", + loops="500000", + mode="process", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=43,datasize=100,loops=500000,mode=process,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..9d9e6f63b8ffa0449345b803ab0aa30e2ff8dae4 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 87b22ef503d21ccb + @用例名称: tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=43,datasize=100,loops=500000,mode=thread,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="43", + datasize="100", + loops="500000", + mode="thread", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=43,datasize=100,loops=500000,mode=thread,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..7f707cb0c2b1cb638c7a8a434dc76a360c03ec80 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 31d83f56524f5034 + @用例名称: tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=43,datasize=100,loops=500000,mode=process,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="43", + datasize="100", + loops="500000", + mode="process", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=43,datasize=100,loops=500000,mode=process,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..7c37ce36f10d95d694e6c22f4c6e2bb4818a45e3 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: ded6539b74f2944c + @用例名称: tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=43,datasize=100,loops=500000,mode=thread,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="43", + datasize="100", + loops="500000", + mode="thread", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=43,datasize=100,loops=500000,mode=thread,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..4f5201a629b09f50bf3f46d420f5121b49687757 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: d0ebb19f7ba0f54d + @用例名称: tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=49,datasize=100,loops=500000,mode=process,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="49", + datasize="100", + loops="500000", + mode="process", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=49,datasize=100,loops=500000,mode=process,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..4a8d72d2a0efa1a2ec8e4cf1b0629cd1949c8391 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: b7d68a1d337dc826 + @用例名称: tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=49,datasize=100,loops=500000,mode=thread,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="49", + datasize="100", + loops="500000", + mode="thread", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=49,datasize=100,loops=500000,mode=thread,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..7368f08a3a1c1613f24a2cd2c6f85b09801f23a6 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 4c5aeaac4a29a95b + @用例名称: tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=49,datasize=100,loops=500000,mode=process,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="49", + datasize="100", + loops="500000", + mode="process", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=49,datasize=100,loops=500000,mode=process,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..88dd2f9a7d3c79eff30840166e8b1c60a7549808 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 2402bfb228e6b32f + @用例名称: tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=49,datasize=100,loops=500000,mode=thread,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="49", + datasize="100", + loops="500000", + mode="thread", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=49,datasize=100,loops=500000,mode=thread,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..033f5e458daa96ee08b4abcb9c15e88e6429b418 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: c499c524d2c7bd90 + @用例名称: tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=56,datasize=100,loops=500000,mode=process,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="56", + datasize="100", + loops="500000", + mode="process", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=56,datasize=100,loops=500000,mode=process,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..b71fbf0e2defc1efda78fbd2389fbd2201b9d53f --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 59134e7099443eb3 + @用例名称: tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=56,datasize=100,loops=500000,mode=thread,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="56", + datasize="100", + loops="500000", + mode="thread", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=56,datasize=100,loops=500000,mode=thread,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..188ae3e8549eb8ed1b2b0400d557fef8298e0af3 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 4f602bfe484f1961 + @用例名称: tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=56,datasize=100,loops=500000,mode=process,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="56", + datasize="100", + loops="500000", + mode="process", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=56,datasize=100,loops=500000,mode=process,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..684590cae5d577c2e1b43e836c0b1139d1066b6d --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 982204b455d0053e + @用例名称: tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=56,datasize=100,loops=500000,mode=thread,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="56", + datasize="100", + loops="500000", + mode="thread", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=56,datasize=100,loops=500000,mode=thread,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..0e87d41c9af7a4968dbebbf2059ce28ad0159952 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 34e740bc4926225b + @用例名称: tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=63,datasize=100,loops=500000,mode=process,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="63", + datasize="100", + loops="500000", + mode="process", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=63,datasize=100,loops=500000,mode=process,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..e76b70037adb86e86da415eb2b831910b690ee72 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7ed221e18a926031 + @用例名称: tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=63,datasize=100,loops=500000,mode=thread,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="63", + datasize="100", + loops="500000", + mode="thread", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=63,datasize=100,loops=500000,mode=thread,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..5e304edf311a8ca31f23be25b601087edc5bc762 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7dba412a252efed3 + @用例名称: tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=63,datasize=100,loops=500000,mode=process,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="63", + datasize="100", + loops="500000", + mode="process", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=63,datasize=100,loops=500000,mode=process,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..9d708f18b1ce9a42d2c2bbc47598c330508492d4 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: e9d3ce2419cc77d9 + @用例名称: tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=63,datasize=100,loops=500000,mode=thread,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="63", + datasize="100", + loops="500000", + mode="thread", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=63,datasize=100,loops=500000,mode=thread,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..0efc82c0480f1460390aa24e60e0f659d28fa642 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7db7729ff1a1fa61 + @用例名称: tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=9,datasize=100,loops=500000,mode=process,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="9", + datasize="100", + loops="500000", + mode="process", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=9,datasize=100,loops=500000,mode=process,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..3b669113855ed943fa9dc6ad3b20269e1f32ae6f --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: f601d46f6fe699c7 + @用例名称: tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=9,datasize=100,loops=500000,mode=thread,ipc=pipe + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="9", + datasize="100", + loops="500000", + mode="thread", + ipc="pipe", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=9,datasize=100,loops=500000,mode=thread,ipc=pipe + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-moprocess.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-moprocess.py new file mode 100755 index 0000000000000000000000000000000000000000..d87e68904df516f501b1fca1eb173551b273f6a8 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-moprocess.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 3b4178b523c0d600 + @用例名称: tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-moprocess + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=9,datasize=100,loops=500000,mode=process,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="9", + datasize="100", + loops="500000", + mode="process", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=9,datasize=100,loops=500000,mode=process,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-mothread.py b/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-mothread.py new file mode 100755 index 0000000000000000000000000000000000000000..82619b4e80092bf0918fd2f1f30436fdd8561c18 --- /dev/null +++ b/testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-mothread.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.hackbench.hackbench import PerfHackBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 5a354ca8dcf9a0d1 + @用例名称: tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-mothread + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用hackbench测试sched性能,参数:fds=1,groups=9,datasize=100,loops=500000,mode=thread,ipc=socket + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具hackbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfHackBench( + tc_name=self.tc_name, + fds="1", + groups="9", + datasize="100", + loops="500000", + mode="thread", + ipc="socket", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用hackbench工具测试性能,参数:fds=1,groups=9,datasize=100,loops=500000,mode=thread,ipc=socket + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/sysbench-args-sched.csv b/testcase/sysbench/sysbench-args-sched.csv new file mode 100644 index 0000000000000000000000000000000000000000..87bcfb663b4c91f0677b1b2b1c9db71934c3f7f9 --- /dev/null +++ b/testcase/sysbench/sysbench-args-sched.csv @@ -0,0 +1,41 @@ +工具名称,子系统,权重,--threads=,--thread_locks=,--thread_yields= +sysbench,sched,0.104801,6,4,1000 +sysbench,sched,0.104801,6,4,2000 +sysbench,sched,0.104801,6,4,3000 +sysbench,sched,0.104801,6,4,4000 +sysbench,sched,0.064904,19,4,1000 +sysbench,sched,0.064904,19,4,2000 +sysbench,sched,0.064904,19,4,3000 +sysbench,sched,0.064904,19,4,4000 +sysbench,sched,0.034818,32,4,1000 +sysbench,sched,0.034818,32,4,2000 +sysbench,sched,0.034818,32,4,3000 +sysbench,sched,0.034818,32,4,4000 +sysbench,sched,0.019003,45,4,1000 +sysbench,sched,0.019003,45,4,2000 +sysbench,sched,0.019003,45,4,3000 +sysbench,sched,0.019003,45,4,4000 +sysbench,sched,0.010617,59,4,1000 +sysbench,sched,0.010617,59,4,2000 +sysbench,sched,0.010617,59,4,3000 +sysbench,sched,0.010617,59,4,4000 +sysbench,sched,0.006726,72,4,1000 +sysbench,sched,0.006726,72,4,2000 +sysbench,sched,0.006726,72,4,3000 +sysbench,sched,0.006726,72,4,4000 +sysbench,sched,0.003729,85,256,1000 +sysbench,sched,0.003729,85,256,2000 +sysbench,sched,0.003729,85,256,3000 +sysbench,sched,0.003729,85,256,4000 +sysbench,sched,0.001972,96,256,1000 +sysbench,sched,0.001972,96,256,2000 +sysbench,sched,0.001972,96,256,3000 +sysbench,sched,0.001972,96,256,4000 +sysbench,sched,0.001084,111,512,1000 +sysbench,sched,0.001084,111,512,2000 +sysbench,sched,0.001084,111,512,3000 +sysbench,sched,0.001084,111,512,4000 +sysbench,sched,0.000791,124,512,1000 +sysbench,sched,0.000791,124,512,2000 +sysbench,sched,0.000791,124,512,3000 +sysbench,sched,0.000791,124,512,4000 diff --git a/testcase/sysbench/sysbench-tune.csv b/testcase/sysbench/sysbench-tune.csv new file mode 100644 index 0000000000000000000000000000000000000000..e9b444c6b98cb90cb6135e7b781ef0d15dbc77d8 --- /dev/null +++ b/testcase/sysbench/sysbench-tune.csv @@ -0,0 +1,42 @@ +# sysbench threads 用例稳定性参数配置 +# 格式: 用例名称,warmup,run_loop,result_select_percent +tperf-sysbench-tl4-ty1000-th6,1,5,100 +tperf-sysbench-tl4-ty2000-th6,1,5,100 +tperf-sysbench-tl4-ty3000-th6,1,5,100 +tperf-sysbench-tl4-ty4000-th6,1,5,100 +tperf-sysbench-tl4-ty1000-th19,1,5,100 +tperf-sysbench-tl4-ty2000-th19,1,5,100 +tperf-sysbench-tl4-ty3000-th19,1,5,100 +tperf-sysbench-tl4-ty4000-th19,1,5,100 +tperf-sysbench-tl4-ty1000-th32,1,5,100 +tperf-sysbench-tl4-ty2000-th32,1,5,100 +tperf-sysbench-tl4-ty3000-th32,1,5,100 +tperf-sysbench-tl4-ty4000-th32,1,5,100 +tperf-sysbench-tl4-ty1000-th45,1,5,100 +tperf-sysbench-tl4-ty2000-th45,1,5,100 +tperf-sysbench-tl4-ty3000-th45,1,5,100 +tperf-sysbench-tl4-ty4000-th45,1,5,100 +tperf-sysbench-tl4-ty1000-th59,1,5,100 +tperf-sysbench-tl4-ty2000-th59,1,5,100 +tperf-sysbench-tl4-ty3000-th59,1,5,100 +tperf-sysbench-tl4-ty4000-th59,1,5,100 +tperf-sysbench-tl4-ty1000-th72,1,5,100 +tperf-sysbench-tl4-ty2000-th72,1,5,100 +tperf-sysbench-tl4-ty3000-th72,1,5,100 +tperf-sysbench-tl4-ty4000-th72,1,5,100 +tperf-sysbench-tl256-ty1000-th85,1,5,100 +tperf-sysbench-tl256-ty2000-th85,1,5,100 +tperf-sysbench-tl256-ty3000-th85,1,5,100 +tperf-sysbench-tl256-ty4000-th85,1,5,100 +tperf-sysbench-tl256-ty1000-th96,1,5,100 +tperf-sysbench-tl256-ty2000-th96,1,5,100 +tperf-sysbench-tl256-ty3000-th96,1,5,100 +tperf-sysbench-tl256-ty4000-th96,1,5,100 +tperf-sysbench-tl512-ty1000-th111,1,5,100 +tperf-sysbench-tl512-ty2000-th111,1,5,100 +tperf-sysbench-tl512-ty3000-th111,1,5,100 +tperf-sysbench-tl512-ty4000-th111,1,5,100 +tperf-sysbench-tl512-ty1000-th124,1,5,100 +tperf-sysbench-tl512-ty2000-th124,1,5,100 +tperf-sysbench-tl512-ty3000-th124,1,5,100 +tperf-sysbench-tl512-ty4000-th124,1,5,100 diff --git a/testcase/sysbench/sysbench.py b/testcase/sysbench/sysbench.py new file mode 100644 index 0000000000000000000000000000000000000000..ee2fb0d21fe9848d619bbc7e2ff7cdd18396cb44 --- /dev/null +++ b/testcase/sysbench/sysbench.py @@ -0,0 +1,64 @@ +#!/usr/bin/python3 +# coding: utf-8 +# Desc: sysbench threads 工具类,供 parse-csv2case.py 通用框架调用 +# +# 内部委托给 lib.ts_common.PerfSysBench,确保生成的 case +# 与老 case (tperf-sysbench-threads-*.py) 行为完全一致。 +# +# CSV 参数列名与 __init__ 参数名的对应关系: +# --threads= → threads +# --thread-locks= → thread_locks +# --thread-yields= → thread_yields + +import os +import sys + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) + +from common.lib.benchmark import TSTPerf # noqa: E402 +from lib.ts_common import PerfSysBench # noqa: E402 + + +class PerfSysbench(TSTPerf): + """sysbench threads 工具类 — 委托给 PerfSysBench + + 接收 parse-csv2case.py 传入的 CSV 字符串参数, + 拼接为 general_opt 后委托给 PerfSysBench。 + """ + + def __init__( + self, + tc_name: str, + threads: str = "1", + thread_locks: str = "4", + thread_yields: str = "1000", + ): + super().__init__() + general_opt = ( + f"--threads={threads} " + f"--thread-locks={thread_locks} " + f"--thread-yields={thread_yields}" + ) + self._impl = PerfSysBench( + name=tc_name, + testname="threads", + label="L0:调度", + general_opt=general_opt, + ) + + def prepare(self): + return self._impl.prepare() + + def benchmark(self): + return self._impl.benchmark() + + def parse_test_data(self): + return self._impl.parse_test_data() + + def cleanup(self): + return self._impl.cleanup() diff --git a/testcase/sysbench/tperf-sysbench-tl256-ty1000-th85.py b/testcase/sysbench/tperf-sysbench-tl256-ty1000-th85.py new file mode 100755 index 0000000000000000000000000000000000000000..ff00a6833f03cf87c3528a819b57f47ffce5fdad --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl256-ty1000-th85.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 4ef09c5d1a2f2760 + @用例名称: tperf-sysbench-tl256-ty1000-th85 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=85,thread_locks=256,thread_yields=1000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="85", + thread_locks="256", + thread_yields="1000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=85,thread_locks=256,thread_yields=1000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl256-ty1000-th96.py b/testcase/sysbench/tperf-sysbench-tl256-ty1000-th96.py new file mode 100755 index 0000000000000000000000000000000000000000..60f8a57d8c63c6a6b1f355a7750bd3702025b129 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl256-ty1000-th96.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 730ef96557d26cae + @用例名称: tperf-sysbench-tl256-ty1000-th96 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=96,thread_locks=256,thread_yields=1000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="96", + thread_locks="256", + thread_yields="1000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=96,thread_locks=256,thread_yields=1000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl256-ty2000-th85.py b/testcase/sysbench/tperf-sysbench-tl256-ty2000-th85.py new file mode 100755 index 0000000000000000000000000000000000000000..237d13fe6d417ddedf673f68c7fbf867c83cc030 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl256-ty2000-th85.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 3d4a07db0097972a + @用例名称: tperf-sysbench-tl256-ty2000-th85 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=85,thread_locks=256,thread_yields=2000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="85", + thread_locks="256", + thread_yields="2000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=85,thread_locks=256,thread_yields=2000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl256-ty2000-th96.py b/testcase/sysbench/tperf-sysbench-tl256-ty2000-th96.py new file mode 100755 index 0000000000000000000000000000000000000000..be9b8269558d168eaf78942136b13d0b8cc8f53c --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl256-ty2000-th96.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: d92e1bb30fa49762 + @用例名称: tperf-sysbench-tl256-ty2000-th96 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=96,thread_locks=256,thread_yields=2000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="96", + thread_locks="256", + thread_yields="2000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=96,thread_locks=256,thread_yields=2000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl256-ty3000-th85.py b/testcase/sysbench/tperf-sysbench-tl256-ty3000-th85.py new file mode 100755 index 0000000000000000000000000000000000000000..bebaa1613ea734d2a186636a87e99549de29fc3e --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl256-ty3000-th85.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 8f3b36437af1851d + @用例名称: tperf-sysbench-tl256-ty3000-th85 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=85,thread_locks=256,thread_yields=3000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="85", + thread_locks="256", + thread_yields="3000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=85,thread_locks=256,thread_yields=3000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl256-ty3000-th96.py b/testcase/sysbench/tperf-sysbench-tl256-ty3000-th96.py new file mode 100755 index 0000000000000000000000000000000000000000..4003cd43a7c295e63af84bdd408a4764948f1b05 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl256-ty3000-th96.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: fc71d94e8499ab52 + @用例名称: tperf-sysbench-tl256-ty3000-th96 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=96,thread_locks=256,thread_yields=3000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="96", + thread_locks="256", + thread_yields="3000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=96,thread_locks=256,thread_yields=3000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl256-ty4000-th85.py b/testcase/sysbench/tperf-sysbench-tl256-ty4000-th85.py new file mode 100755 index 0000000000000000000000000000000000000000..51e371d2320af95e3c8a67a5acde443677dd534f --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl256-ty4000-th85.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 9ed93a75d3247174 + @用例名称: tperf-sysbench-tl256-ty4000-th85 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=85,thread_locks=256,thread_yields=4000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="85", + thread_locks="256", + thread_yields="4000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=85,thread_locks=256,thread_yields=4000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl256-ty4000-th96.py b/testcase/sysbench/tperf-sysbench-tl256-ty4000-th96.py new file mode 100755 index 0000000000000000000000000000000000000000..bfb082c060d3ade730a4f20818cc7900ec6dab87 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl256-ty4000-th96.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: e1162adc14aa0771 + @用例名称: tperf-sysbench-tl256-ty4000-th96 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=96,thread_locks=256,thread_yields=4000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="96", + thread_locks="256", + thread_yields="4000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=96,thread_locks=256,thread_yields=4000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty1000-th19.py b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th19.py new file mode 100755 index 0000000000000000000000000000000000000000..d81b9decc7608cddb621afabdff5451c81e2e0f1 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th19.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: f006ae46a7c0fd5e + @用例名称: tperf-sysbench-tl4-ty1000-th19 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=19,thread_locks=4,thread_yields=1000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="19", + thread_locks="4", + thread_yields="1000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=19,thread_locks=4,thread_yields=1000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty1000-th32.py b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th32.py new file mode 100755 index 0000000000000000000000000000000000000000..15468fecd8e2bec576f92877f5614f4065153853 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th32.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: bcf7cffdb5b6cdca + @用例名称: tperf-sysbench-tl4-ty1000-th32 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=32,thread_locks=4,thread_yields=1000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="32", + thread_locks="4", + thread_yields="1000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=32,thread_locks=4,thread_yields=1000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty1000-th45.py b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th45.py new file mode 100755 index 0000000000000000000000000000000000000000..3664266a7e30c108fadbceeb5429fcff63160a70 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th45.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: f39403983df1c8ee + @用例名称: tperf-sysbench-tl4-ty1000-th45 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=45,thread_locks=4,thread_yields=1000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="45", + thread_locks="4", + thread_yields="1000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=45,thread_locks=4,thread_yields=1000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty1000-th59.py b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th59.py new file mode 100755 index 0000000000000000000000000000000000000000..29888dfe95f2251033e76b393e60861236bae1b2 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th59.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 227b3a0379237ceb + @用例名称: tperf-sysbench-tl4-ty1000-th59 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=59,thread_locks=4,thread_yields=1000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="59", + thread_locks="4", + thread_yields="1000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=59,thread_locks=4,thread_yields=1000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty1000-th6.py b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th6.py new file mode 100755 index 0000000000000000000000000000000000000000..82bb2d7c2f13f2119b4b52da7c0847473f123b4b --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th6.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 203d2fc9beb71a2c + @用例名称: tperf-sysbench-tl4-ty1000-th6 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=6,thread_locks=4,thread_yields=1000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="6", + thread_locks="4", + thread_yields="1000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=6,thread_locks=4,thread_yields=1000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty1000-th72.py b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th72.py new file mode 100755 index 0000000000000000000000000000000000000000..e64e125e64ac6a1c9acf56cedd816be15c45b17a --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty1000-th72.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 3bf2768453f1b685 + @用例名称: tperf-sysbench-tl4-ty1000-th72 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=72,thread_locks=4,thread_yields=1000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="72", + thread_locks="4", + thread_yields="1000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=72,thread_locks=4,thread_yields=1000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty2000-th19.py b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th19.py new file mode 100755 index 0000000000000000000000000000000000000000..b623a5623880b3eabb60928d76d0f7d8abd20317 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th19.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 603292f7eadd8f60 + @用例名称: tperf-sysbench-tl4-ty2000-th19 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=19,thread_locks=4,thread_yields=2000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="19", + thread_locks="4", + thread_yields="2000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=19,thread_locks=4,thread_yields=2000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty2000-th32.py b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th32.py new file mode 100755 index 0000000000000000000000000000000000000000..c46e5f3f040f255393166b5e317d488dcf025d79 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th32.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: e537b3aabff032a0 + @用例名称: tperf-sysbench-tl4-ty2000-th32 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=32,thread_locks=4,thread_yields=2000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="32", + thread_locks="4", + thread_yields="2000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=32,thread_locks=4,thread_yields=2000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty2000-th45.py b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th45.py new file mode 100755 index 0000000000000000000000000000000000000000..cca4ddb5fb2e8f5a37f5d300966d8b53a82dbac9 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th45.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: f6433ebc23d72ae6 + @用例名称: tperf-sysbench-tl4-ty2000-th45 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=45,thread_locks=4,thread_yields=2000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="45", + thread_locks="4", + thread_yields="2000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=45,thread_locks=4,thread_yields=2000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty2000-th59.py b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th59.py new file mode 100755 index 0000000000000000000000000000000000000000..7354e83fb2f90f9b7128a263431eb2fc53b97b24 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th59.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 85055f2f3e42f168 + @用例名称: tperf-sysbench-tl4-ty2000-th59 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=59,thread_locks=4,thread_yields=2000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="59", + thread_locks="4", + thread_yields="2000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=59,thread_locks=4,thread_yields=2000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty2000-th6.py b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th6.py new file mode 100755 index 0000000000000000000000000000000000000000..e58c402d591abc616fe3113d0bc422d8d711712e --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th6.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: eba6f423d09ab565 + @用例名称: tperf-sysbench-tl4-ty2000-th6 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=6,thread_locks=4,thread_yields=2000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="6", + thread_locks="4", + thread_yields="2000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=6,thread_locks=4,thread_yields=2000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty2000-th72.py b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th72.py new file mode 100755 index 0000000000000000000000000000000000000000..55ccf205c50ec828dbccf45f7f4e930c647b44cb --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty2000-th72.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: ec9d9da791232b50 + @用例名称: tperf-sysbench-tl4-ty2000-th72 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=72,thread_locks=4,thread_yields=2000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="72", + thread_locks="4", + thread_yields="2000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=72,thread_locks=4,thread_yields=2000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty3000-th19.py b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th19.py new file mode 100755 index 0000000000000000000000000000000000000000..cc4808cfa4583cab12cdb41eebb9dfb5613a1783 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th19.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 324730d785f03909 + @用例名称: tperf-sysbench-tl4-ty3000-th19 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=19,thread_locks=4,thread_yields=3000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="19", + thread_locks="4", + thread_yields="3000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=19,thread_locks=4,thread_yields=3000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty3000-th32.py b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th32.py new file mode 100755 index 0000000000000000000000000000000000000000..6489c23e0151e06d76a1d234eafde2285faaa382 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th32.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 8f05e0ba96f349d6 + @用例名称: tperf-sysbench-tl4-ty3000-th32 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=32,thread_locks=4,thread_yields=3000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="32", + thread_locks="4", + thread_yields="3000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=32,thread_locks=4,thread_yields=3000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty3000-th45.py b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th45.py new file mode 100755 index 0000000000000000000000000000000000000000..20260f79df8ae0906fe205822f1853de29e27927 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th45.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 272b17efce729a12 + @用例名称: tperf-sysbench-tl4-ty3000-th45 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=45,thread_locks=4,thread_yields=3000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="45", + thread_locks="4", + thread_yields="3000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=45,thread_locks=4,thread_yields=3000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty3000-th59.py b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th59.py new file mode 100755 index 0000000000000000000000000000000000000000..06fd86e2db3e3b1d9bb388391da14ab1539ceb69 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th59.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 035651b5df2ac42f + @用例名称: tperf-sysbench-tl4-ty3000-th59 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=59,thread_locks=4,thread_yields=3000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="59", + thread_locks="4", + thread_yields="3000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=59,thread_locks=4,thread_yields=3000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty3000-th6.py b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th6.py new file mode 100755 index 0000000000000000000000000000000000000000..5abde7501787fea215c7af973ae1314e07612cf0 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th6.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 529bbfc418757e43 + @用例名称: tperf-sysbench-tl4-ty3000-th6 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=6,thread_locks=4,thread_yields=3000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="6", + thread_locks="4", + thread_yields="3000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=6,thread_locks=4,thread_yields=3000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty3000-th72.py b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th72.py new file mode 100755 index 0000000000000000000000000000000000000000..c12f591c09db4239e319b20ebbcd20cd6ad58148 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty3000-th72.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 619383f523d61837 + @用例名称: tperf-sysbench-tl4-ty3000-th72 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=72,thread_locks=4,thread_yields=3000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="72", + thread_locks="4", + thread_yields="3000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=72,thread_locks=4,thread_yields=3000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty4000-th19.py b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th19.py new file mode 100755 index 0000000000000000000000000000000000000000..eb0380fa3d1eccb07d79af2b2ba8de6dac571caf --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th19.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 0aab59128565b35b + @用例名称: tperf-sysbench-tl4-ty4000-th19 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=19,thread_locks=4,thread_yields=4000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="19", + thread_locks="4", + thread_yields="4000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=19,thread_locks=4,thread_yields=4000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty4000-th32.py b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th32.py new file mode 100755 index 0000000000000000000000000000000000000000..037c6bde37b41cd703b8b6d55327ded72021675f --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th32.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 610b0221aa7c3642 + @用例名称: tperf-sysbench-tl4-ty4000-th32 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=32,thread_locks=4,thread_yields=4000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="32", + thread_locks="4", + thread_yields="4000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=32,thread_locks=4,thread_yields=4000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty4000-th45.py b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th45.py new file mode 100755 index 0000000000000000000000000000000000000000..0b3d4b93bce534582cc96f57b13d9258ca2043c2 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th45.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 776353c5529dc3a3 + @用例名称: tperf-sysbench-tl4-ty4000-th45 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=45,thread_locks=4,thread_yields=4000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="45", + thread_locks="4", + thread_yields="4000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=45,thread_locks=4,thread_yields=4000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty4000-th59.py b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th59.py new file mode 100755 index 0000000000000000000000000000000000000000..538762401581d3936e98a14c9cff08d0c2d147c3 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th59.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 6d431bc211db5922 + @用例名称: tperf-sysbench-tl4-ty4000-th59 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=59,thread_locks=4,thread_yields=4000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="59", + thread_locks="4", + thread_yields="4000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=59,thread_locks=4,thread_yields=4000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty4000-th6.py b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th6.py new file mode 100755 index 0000000000000000000000000000000000000000..512b6c08de35ee333ba0fb7cc9a11b3965cfc3a1 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th6.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 60cd637f19c06b32 + @用例名称: tperf-sysbench-tl4-ty4000-th6 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=6,thread_locks=4,thread_yields=4000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="6", + thread_locks="4", + thread_yields="4000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=6,thread_locks=4,thread_yields=4000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl4-ty4000-th72.py b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th72.py new file mode 100755 index 0000000000000000000000000000000000000000..764c73560c9a23b75cc5810e35f6596cbefc04c5 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl4-ty4000-th72.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: a8d70875e192babe + @用例名称: tperf-sysbench-tl4-ty4000-th72 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=72,thread_locks=4,thread_yields=4000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="72", + thread_locks="4", + thread_yields="4000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=72,thread_locks=4,thread_yields=4000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl512-ty1000-th111.py b/testcase/sysbench/tperf-sysbench-tl512-ty1000-th111.py new file mode 100755 index 0000000000000000000000000000000000000000..3590aecadcde72bc9366affb6d25cc607e2aa9e3 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl512-ty1000-th111.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: d1a71ff18184c044 + @用例名称: tperf-sysbench-tl512-ty1000-th111 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=111,thread_locks=512,thread_yields=1000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="111", + thread_locks="512", + thread_yields="1000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=111,thread_locks=512,thread_yields=1000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl512-ty1000-th124.py b/testcase/sysbench/tperf-sysbench-tl512-ty1000-th124.py new file mode 100755 index 0000000000000000000000000000000000000000..30ef3e43ad15373634c147f59dff8a23a6e362eb --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl512-ty1000-th124.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: ab1230ac001e4f64 + @用例名称: tperf-sysbench-tl512-ty1000-th124 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=124,thread_locks=512,thread_yields=1000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="124", + thread_locks="512", + thread_yields="1000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=124,thread_locks=512,thread_yields=1000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl512-ty2000-th111.py b/testcase/sysbench/tperf-sysbench-tl512-ty2000-th111.py new file mode 100755 index 0000000000000000000000000000000000000000..ed02197a3392df6743fe58ef24198bb149874118 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl512-ty2000-th111.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 9053d3ed0c72c3b8 + @用例名称: tperf-sysbench-tl512-ty2000-th111 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=111,thread_locks=512,thread_yields=2000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="111", + thread_locks="512", + thread_yields="2000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=111,thread_locks=512,thread_yields=2000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl512-ty2000-th124.py b/testcase/sysbench/tperf-sysbench-tl512-ty2000-th124.py new file mode 100755 index 0000000000000000000000000000000000000000..50f50b4d73d6ec3b6f1b2b965a0cfde6716a7aac --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl512-ty2000-th124.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 033c357ad4e70445 + @用例名称: tperf-sysbench-tl512-ty2000-th124 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=124,thread_locks=512,thread_yields=2000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="124", + thread_locks="512", + thread_yields="2000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=124,thread_locks=512,thread_yields=2000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl512-ty3000-th111.py b/testcase/sysbench/tperf-sysbench-tl512-ty3000-th111.py new file mode 100755 index 0000000000000000000000000000000000000000..ee7d9e17bd63688d2a947e201195a515bbf51c32 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl512-ty3000-th111.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 42ef89d3f3c569da + @用例名称: tperf-sysbench-tl512-ty3000-th111 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=111,thread_locks=512,thread_yields=3000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="111", + thread_locks="512", + thread_yields="3000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=111,thread_locks=512,thread_yields=3000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl512-ty3000-th124.py b/testcase/sysbench/tperf-sysbench-tl512-ty3000-th124.py new file mode 100755 index 0000000000000000000000000000000000000000..0c01ab0935743068cc01e53bb23ec8ae4c2faa2e --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl512-ty3000-th124.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 343f3ade150a3153 + @用例名称: tperf-sysbench-tl512-ty3000-th124 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=124,thread_locks=512,thread_yields=3000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="124", + thread_locks="512", + thread_yields="3000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=124,thread_locks=512,thread_yields=3000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl512-ty4000-th111.py b/testcase/sysbench/tperf-sysbench-tl512-ty4000-th111.py new file mode 100755 index 0000000000000000000000000000000000000000..09065372204a2f158baf0f18d917655b4c6bac81 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl512-ty4000-th111.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 4d7d6c28dc4cb9de + @用例名称: tperf-sysbench-tl512-ty4000-th111 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=111,thread_locks=512,thread_yields=4000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="111", + thread_locks="512", + thread_yields="4000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=111,thread_locks=512,thread_yields=4000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/sysbench/tperf-sysbench-tl512-ty4000-th124.py b/testcase/sysbench/tperf-sysbench-tl512-ty4000-th124.py new file mode 100755 index 0000000000000000000000000000000000000000..c9d1f8761c4cc27349f17de47f63ecb57e6b2fd2 --- /dev/null +++ b/testcase/sysbench/tperf-sysbench-tl512-ty4000-th124.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.sysbench.sysbench import PerfSysbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: c35ec385fe232807 + @用例名称: tperf-sysbench-tl512-ty4000-th124 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench测试sched性能,参数:threads=124,thread_locks=512,thread_yields=4000 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具sysbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfSysbench( + tc_name=self.tc_name, + threads="124", + thread_locks="512", + thread_yields="4000", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用sysbench工具测试性能,参数:threads=124,thread_locks=512,thread_yields=4000 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=100, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv)