diff --git a/testcase/tperf-sysbench-threads-16-locks-24-yields-1000.py b/testcase/tperf-sysbench-threads-16-locks-24-yields-1000.py new file mode 100755 index 0000000000000000000000000000000000000000..ea487110b3944060cdeb77ac7544042701f72e80 --- /dev/null +++ b/testcase/tperf-sysbench-threads-16-locks-24-yields-1000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000001 + @用例名称: tperf-sysbench-threads-16-locks-24-yields-1000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-16-locks-24-yields-1000", + testname="threads", + label="L0:调度", + general_opt="--threads=16 --thread-locks=24 --thread-yields=1000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-16-locks-24-yields-10000.py b/testcase/tperf-sysbench-threads-16-locks-24-yields-10000.py new file mode 100755 index 0000000000000000000000000000000000000000..5f978a6d6702cd695cf0dd268e79f36fb6339530 --- /dev/null +++ b/testcase/tperf-sysbench-threads-16-locks-24-yields-10000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000002 + @用例名称: tperf-sysbench-threads-16-locks-24-yields-10000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-16-locks-24-yields-10000", + testname="threads", + label="L0:调度", + general_opt="--threads=16 --thread-locks=24 --thread-yields=10000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-16-locks-48-yields-1000.py b/testcase/tperf-sysbench-threads-16-locks-48-yields-1000.py new file mode 100755 index 0000000000000000000000000000000000000000..5c20a2fa483463c4c6164855f52dddea1e3615bb --- /dev/null +++ b/testcase/tperf-sysbench-threads-16-locks-48-yields-1000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000003 + @用例名称: tperf-sysbench-threads-16-locks-48-yields-1000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-16-locks-48-yields-1000", + testname="threads", + label="L0:调度", + general_opt="--threads=16 --thread-locks=48 --thread-yields=1000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-16-locks-48-yields-10000.py b/testcase/tperf-sysbench-threads-16-locks-48-yields-10000.py new file mode 100755 index 0000000000000000000000000000000000000000..c725540e985c875144fdb0f3c9b024a0c524bc27 --- /dev/null +++ b/testcase/tperf-sysbench-threads-16-locks-48-yields-10000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000004 + @用例名称: tperf-sysbench-threads-16-locks-48-yields-10000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-16-locks-48-yields-10000", + testname="threads", + label="L0:调度", + general_opt="--threads=16 --thread-locks=48 --thread-yields=10000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-16-locks-96-yields-1000.py b/testcase/tperf-sysbench-threads-16-locks-96-yields-1000.py new file mode 100755 index 0000000000000000000000000000000000000000..7b6908b67216a9c80fb29776878aed97e77c91cb --- /dev/null +++ b/testcase/tperf-sysbench-threads-16-locks-96-yields-1000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000005 + @用例名称: tperf-sysbench-threads-16-locks-96-yields-1000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-16-locks-96-yields-1000", + testname="threads", + label="L0:调度", + general_opt="--threads=16 --thread-locks=96 --thread-yields=1000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-16-locks-96-yields-10000.py b/testcase/tperf-sysbench-threads-16-locks-96-yields-10000.py new file mode 100755 index 0000000000000000000000000000000000000000..1426ddfb8744741818be8c40811d3a53ee8b37b1 --- /dev/null +++ b/testcase/tperf-sysbench-threads-16-locks-96-yields-10000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000006 + @用例名称: tperf-sysbench-threads-16-locks-96-yields-10000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-16-locks-96-yields-10000", + testname="threads", + label="L0:调度", + general_opt="--threads=16 --thread-locks=96 --thread-yields=10000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-32-locks-24-yields-1000.py b/testcase/tperf-sysbench-threads-32-locks-24-yields-1000.py new file mode 100755 index 0000000000000000000000000000000000000000..9e92eed8bba52ddf2dfb1025fd50ab48fb2bb8ad --- /dev/null +++ b/testcase/tperf-sysbench-threads-32-locks-24-yields-1000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000007 + @用例名称: tperf-sysbench-threads-32-locks-24-yields-1000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-32-locks-24-yields-1000", + testname="threads", + label="L0:调度", + general_opt="--threads=32 --thread-locks=24 --thread-yields=1000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-32-locks-24-yields-10000.py b/testcase/tperf-sysbench-threads-32-locks-24-yields-10000.py new file mode 100755 index 0000000000000000000000000000000000000000..8f94549151b0710edbbac3e2f55751eca9fc3382 --- /dev/null +++ b/testcase/tperf-sysbench-threads-32-locks-24-yields-10000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000008 + @用例名称: tperf-sysbench-threads-32-locks-24-yields-10000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-32-locks-24-yields-10000", + testname="threads", + label="L0:调度", + general_opt="--threads=32 --thread-locks=24 --thread-yields=10000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-32-locks-48-yields-1000.py b/testcase/tperf-sysbench-threads-32-locks-48-yields-1000.py new file mode 100755 index 0000000000000000000000000000000000000000..d1e12a0364451141e8566fbbcd7703f1f57a53ac --- /dev/null +++ b/testcase/tperf-sysbench-threads-32-locks-48-yields-1000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000009 + @用例名称: tperf-sysbench-threads-32-locks-48-yields-1000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-32-locks-48-yields-1000", + testname="threads", + label="L0:调度", + general_opt="--threads=32 --thread-locks=48 --thread-yields=1000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-32-locks-48-yields-10000.py b/testcase/tperf-sysbench-threads-32-locks-48-yields-10000.py new file mode 100755 index 0000000000000000000000000000000000000000..010444cb1443b14986c004ba24f6ef095297de9f --- /dev/null +++ b/testcase/tperf-sysbench-threads-32-locks-48-yields-10000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000010 + @用例名称: tperf-sysbench-threads-32-locks-48-yields-10000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-32-locks-48-yields-10000", + testname="threads", + label="L0:调度", + general_opt="--threads=32 --thread-locks=48 --thread-yields=10000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-32-locks-96-yields-1000.py b/testcase/tperf-sysbench-threads-32-locks-96-yields-1000.py new file mode 100755 index 0000000000000000000000000000000000000000..0facb722ff7c578dd013f686b13acf0c5aa4908b --- /dev/null +++ b/testcase/tperf-sysbench-threads-32-locks-96-yields-1000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000011 + @用例名称: tperf-sysbench-threads-32-locks-96-yields-1000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-32-locks-96-yields-1000", + testname="threads", + label="L0:调度", + general_opt="--threads=32 --thread-locks=96 --thread-yields=1000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-32-locks-96-yields-10000.py b/testcase/tperf-sysbench-threads-32-locks-96-yields-10000.py new file mode 100755 index 0000000000000000000000000000000000000000..c8e7f1e6c1e6098948df627662aef2de9bf3f2ff --- /dev/null +++ b/testcase/tperf-sysbench-threads-32-locks-96-yields-10000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000012 + @用例名称: tperf-sysbench-threads-32-locks-96-yields-10000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-32-locks-96-yields-10000", + testname="threads", + label="L0:调度", + general_opt="--threads=32 --thread-locks=96 --thread-yields=10000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-8-locks-16-yields-1000.py b/testcase/tperf-sysbench-threads-8-locks-16-yields-1000.py new file mode 100755 index 0000000000000000000000000000000000000000..17f74706153d9efe95e1c9c2e3170daef7250070 --- /dev/null +++ b/testcase/tperf-sysbench-threads-8-locks-16-yields-1000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000013 + @用例名称: tperf-sysbench-threads-8-locks-16-yields-1000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-8-locks-16-yields-1000", + testname="threads", + label="L0:调度", + general_opt="--threads=8 --thread-locks=16 --thread-yields=1000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-8-locks-16-yields-10000.py b/testcase/tperf-sysbench-threads-8-locks-16-yields-10000.py new file mode 100755 index 0000000000000000000000000000000000000000..3f1c51ae088db2189073b9c40201f3f736649691 --- /dev/null +++ b/testcase/tperf-sysbench-threads-8-locks-16-yields-10000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000014 + @用例名称: tperf-sysbench-threads-8-locks-16-yields-10000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-8-locks-16-yields-10000", + testname="threads", + label="L0:调度", + general_opt="--threads=8 --thread-locks=16 --thread-yields=10000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-8-locks-32-yields-1000.py b/testcase/tperf-sysbench-threads-8-locks-32-yields-1000.py new file mode 100755 index 0000000000000000000000000000000000000000..dd53257af11daf1b30bb43c1becdd23342b538c8 --- /dev/null +++ b/testcase/tperf-sysbench-threads-8-locks-32-yields-1000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000015 + @用例名称: tperf-sysbench-threads-8-locks-32-yields-1000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-8-locks-32-yields-1000", + testname="threads", + label="L0:调度", + general_opt="--threads=8 --thread-locks=32 --thread-yields=1000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-8-locks-32-yields-10000.py b/testcase/tperf-sysbench-threads-8-locks-32-yields-10000.py new file mode 100755 index 0000000000000000000000000000000000000000..61190d66ab1778e3cfb028820744490be3951346 --- /dev/null +++ b/testcase/tperf-sysbench-threads-8-locks-32-yields-10000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000016 + @用例名称: tperf-sysbench-threads-8-locks-32-yields-10000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-8-locks-32-yields-10000", + testname="threads", + label="L0:调度", + general_opt="--threads=8 --thread-locks=32 --thread-yields=10000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-8-locks-8-yields-1000.py b/testcase/tperf-sysbench-threads-8-locks-8-yields-1000.py new file mode 100755 index 0000000000000000000000000000000000000000..0d60712d491578381bce6f401fd9cfb7ae31c1d1 --- /dev/null +++ b/testcase/tperf-sysbench-threads-8-locks-8-yields-1000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000017 + @用例名称: tperf-sysbench-threads-8-locks-8-yields-1000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-8-locks-8-yields-1000", + testname="threads", + label="L0:调度", + general_opt="--threads=8 --thread-locks=8 --thread-yields=1000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.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/tperf-sysbench-threads-8-locks-8-yields-10000.py b/testcase/tperf-sysbench-threads-8-locks-8-yields-10000.py new file mode 100755 index 0000000000000000000000000000000000000000..ceda57e0b5785217ae127c08db5ff70c6f8aee7e --- /dev/null +++ b/testcase/tperf-sysbench-threads-8-locks-8-yields-10000.py @@ -0,0 +1,53 @@ +#!/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, PerfSysBench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 20250708-170001-000000018 + @用例名称: tperf-sysbench-threads-8-locks-8-yields-10000 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: 性能测试 + @自动化: 1 + @超时时间: 0 + @用例描述: 使用sysbench工具测试thread项目性能 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + + # @预置条件: 系统正常启动 + + def do_test(self, *args): + self.msg("this is do_test") + # @测试步骤: 使用sysbench执行cpu性能测试 + # @预期结果: 性能测试正常并且可以获取到性能数据 + perf = PerfSysBench( + name="tperf-sysbench-threads-8-locks-8-yields-10000", + testname="threads", + label="L0:调度", + general_opt="--threads=8 --thread-locks=8 --thread-yields=10000", + ) + perf.run(warmup=1,run_loop=2,result_select_percent=90) + perf.report() + self.assert_true(len(perf.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv)