From 869743708370dfdbec0282d87194eb1d28f3983c Mon Sep 17 00:00:00 2001 From: Jian Zhao Date: Tue, 31 Mar 2026 15:57:47 +0800 Subject: [PATCH 1/3] feat(hackbench): add hackbench tool class and CSV configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - hackbench.py: wrapper class delegating to PerfRTTestsHackBench - hackbench-args-sched.csv: 40 cases (10 tiers × 4 modes), loops=500000 - hackbench-tune.csv: warmup=1, run_loop=10, result_select_percent=80 - .gitignore: ignore auto-generated testcase/*/tperf-*.py files Signed-off-by: Jian Zhao --- .gitignore | 3 + testcase/hackbench/hackbench-args-sched.csv | 41 ++++++++++++ testcase/hackbench/hackbench-tune.csv | 42 +++++++++++++ testcase/hackbench/hackbench.py | 70 +++++++++++++++++++++ 4 files changed, 156 insertions(+) create mode 100644 testcase/hackbench/hackbench-args-sched.csv create mode 100644 testcase/hackbench/hackbench-tune.csv create mode 100644 testcase/hackbench/hackbench.py diff --git a/.gitignore b/.gitignore index 5cef144..9a55347 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ compile_commands.json /tools/*.install.fail/ /.vscode/ /*.xlsx + +# 自动生成的 case 文件(由 parse-csv2case.py 生成) +testcase/*/tperf-*.py diff --git a/testcase/hackbench/hackbench-args-sched.csv b/testcase/hackbench/hackbench-args-sched.csv new file mode 100644 index 0000000..28c407b --- /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 0000000..ad44f2b --- /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 0000000..56dd9f1 --- /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() -- Gitee From f32abbe6bcb00387834b73ccfdb5364bce1a522d Mon Sep 17 00:00:00 2001 From: Jian Zhao Date: Tue, 31 Mar 2026 16:54:24 +0800 Subject: [PATCH 2/3] feat(sysbench): add sysbench threads tool class and CSV configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - sysbench.py: wrapper class delegating to PerfSysBench - sysbench-args-sched.csv: 40 cases (10 tiers × 4 yields modes) - sysbench-tune.csv: warmup=1, run_loop=5, result_select_percent=100 Signed-off-by: Jian Zhao --- .gitignore | 2 - testcase/sysbench/sysbench-args-sched.csv | 41 +++++++++++++++ testcase/sysbench/sysbench-tune.csv | 42 +++++++++++++++ testcase/sysbench/sysbench.py | 64 +++++++++++++++++++++++ 4 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 testcase/sysbench/sysbench-args-sched.csv create mode 100644 testcase/sysbench/sysbench-tune.csv create mode 100644 testcase/sysbench/sysbench.py diff --git a/.gitignore b/.gitignore index 9a55347..e5c5c07 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,3 @@ compile_commands.json /.vscode/ /*.xlsx -# 自动生成的 case 文件(由 parse-csv2case.py 生成) -testcase/*/tperf-*.py diff --git a/testcase/sysbench/sysbench-args-sched.csv b/testcase/sysbench/sysbench-args-sched.csv new file mode 100644 index 0000000..87bcfb6 --- /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 0000000..e9b444c --- /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 0000000..ee2fb0d --- /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() -- Gitee From ece841f2a04ba29573cf7ed9b537cde029558122 Mon Sep 17 00:00:00 2001 From: Jian Zhao Date: Tue, 31 Mar 2026 18:01:45 +0800 Subject: [PATCH 3/3] data: add generated hackbench and sysbench test cases (80 cases) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - hackbench: 40 cases (10 tiers × 4 modes), loops=500000 - sysbench: 40 cases (10 tiers × 4 yields modes) Signed-off-by: Jian Zhao --- ...a100-fd1-gr16-ippipe-lo500000-moprocess.py | 63 +++++++++++++++++++ ...da100-fd1-gr16-ippipe-lo500000-mothread.py | 63 +++++++++++++++++++ ...00-fd1-gr16-ipsocket-lo500000-moprocess.py | 63 +++++++++++++++++++ ...100-fd1-gr16-ipsocket-lo500000-mothread.py | 63 +++++++++++++++++++ ...a100-fd1-gr22-ippipe-lo500000-moprocess.py | 63 +++++++++++++++++++ ...da100-fd1-gr22-ippipe-lo500000-mothread.py | 63 +++++++++++++++++++ ...00-fd1-gr22-ipsocket-lo500000-moprocess.py | 63 +++++++++++++++++++ ...100-fd1-gr22-ipsocket-lo500000-mothread.py | 63 +++++++++++++++++++ ...da100-fd1-gr3-ippipe-lo500000-moprocess.py | 63 +++++++++++++++++++ ...-da100-fd1-gr3-ippipe-lo500000-mothread.py | 63 +++++++++++++++++++ ...100-fd1-gr3-ipsocket-lo500000-moprocess.py | 63 +++++++++++++++++++ ...a100-fd1-gr3-ipsocket-lo500000-mothread.py | 63 +++++++++++++++++++ ...a100-fd1-gr30-ippipe-lo500000-moprocess.py | 63 +++++++++++++++++++ ...da100-fd1-gr30-ippipe-lo500000-mothread.py | 63 +++++++++++++++++++ ...00-fd1-gr30-ipsocket-lo500000-moprocess.py | 63 +++++++++++++++++++ ...100-fd1-gr30-ipsocket-lo500000-mothread.py | 63 +++++++++++++++++++ ...a100-fd1-gr36-ippipe-lo500000-moprocess.py | 63 +++++++++++++++++++ ...da100-fd1-gr36-ippipe-lo500000-mothread.py | 63 +++++++++++++++++++ ...00-fd1-gr36-ipsocket-lo500000-moprocess.py | 63 +++++++++++++++++++ ...100-fd1-gr36-ipsocket-lo500000-mothread.py | 63 +++++++++++++++++++ ...a100-fd1-gr43-ippipe-lo500000-moprocess.py | 63 +++++++++++++++++++ ...da100-fd1-gr43-ippipe-lo500000-mothread.py | 63 +++++++++++++++++++ ...00-fd1-gr43-ipsocket-lo500000-moprocess.py | 63 +++++++++++++++++++ ...100-fd1-gr43-ipsocket-lo500000-mothread.py | 63 +++++++++++++++++++ ...a100-fd1-gr49-ippipe-lo500000-moprocess.py | 63 +++++++++++++++++++ ...da100-fd1-gr49-ippipe-lo500000-mothread.py | 63 +++++++++++++++++++ ...00-fd1-gr49-ipsocket-lo500000-moprocess.py | 63 +++++++++++++++++++ ...100-fd1-gr49-ipsocket-lo500000-mothread.py | 63 +++++++++++++++++++ ...a100-fd1-gr56-ippipe-lo500000-moprocess.py | 63 +++++++++++++++++++ ...da100-fd1-gr56-ippipe-lo500000-mothread.py | 63 +++++++++++++++++++ ...00-fd1-gr56-ipsocket-lo500000-moprocess.py | 63 +++++++++++++++++++ ...100-fd1-gr56-ipsocket-lo500000-mothread.py | 63 +++++++++++++++++++ ...a100-fd1-gr63-ippipe-lo500000-moprocess.py | 63 +++++++++++++++++++ ...da100-fd1-gr63-ippipe-lo500000-mothread.py | 63 +++++++++++++++++++ ...00-fd1-gr63-ipsocket-lo500000-moprocess.py | 63 +++++++++++++++++++ ...100-fd1-gr63-ipsocket-lo500000-mothread.py | 63 +++++++++++++++++++ ...da100-fd1-gr9-ippipe-lo500000-moprocess.py | 63 +++++++++++++++++++ ...-da100-fd1-gr9-ippipe-lo500000-mothread.py | 63 +++++++++++++++++++ ...100-fd1-gr9-ipsocket-lo500000-moprocess.py | 63 +++++++++++++++++++ ...a100-fd1-gr9-ipsocket-lo500000-mothread.py | 63 +++++++++++++++++++ .../tperf-sysbench-tl256-ty1000-th85.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl256-ty1000-th96.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl256-ty2000-th85.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl256-ty2000-th96.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl256-ty3000-th85.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl256-ty3000-th96.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl256-ty4000-th85.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl256-ty4000-th96.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty1000-th19.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty1000-th32.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty1000-th45.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty1000-th59.py | 60 ++++++++++++++++++ .../sysbench/tperf-sysbench-tl4-ty1000-th6.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty1000-th72.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty2000-th19.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty2000-th32.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty2000-th45.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty2000-th59.py | 60 ++++++++++++++++++ .../sysbench/tperf-sysbench-tl4-ty2000-th6.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty2000-th72.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty3000-th19.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty3000-th32.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty3000-th45.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty3000-th59.py | 60 ++++++++++++++++++ .../sysbench/tperf-sysbench-tl4-ty3000-th6.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty3000-th72.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty4000-th19.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty4000-th32.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty4000-th45.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty4000-th59.py | 60 ++++++++++++++++++ .../sysbench/tperf-sysbench-tl4-ty4000-th6.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl4-ty4000-th72.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl512-ty1000-th111.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl512-ty1000-th124.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl512-ty2000-th111.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl512-ty2000-th124.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl512-ty3000-th111.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl512-ty3000-th124.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl512-ty4000-th111.py | 60 ++++++++++++++++++ .../tperf-sysbench-tl512-ty4000-th124.py | 60 ++++++++++++++++++ 80 files changed, 4920 insertions(+) create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ippipe-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr16-ipsocket-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ippipe-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr22-ipsocket-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ippipe-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr3-ipsocket-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ippipe-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr30-ipsocket-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ippipe-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr36-ipsocket-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ippipe-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr43-ipsocket-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ippipe-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr49-ipsocket-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ippipe-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr56-ipsocket-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ippipe-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr63-ipsocket-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ippipe-lo500000-mothread.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-moprocess.py create mode 100755 testcase/hackbench/tperf-hackbench-da100-fd1-gr9-ipsocket-lo500000-mothread.py create mode 100755 testcase/sysbench/tperf-sysbench-tl256-ty1000-th85.py create mode 100755 testcase/sysbench/tperf-sysbench-tl256-ty1000-th96.py create mode 100755 testcase/sysbench/tperf-sysbench-tl256-ty2000-th85.py create mode 100755 testcase/sysbench/tperf-sysbench-tl256-ty2000-th96.py create mode 100755 testcase/sysbench/tperf-sysbench-tl256-ty3000-th85.py create mode 100755 testcase/sysbench/tperf-sysbench-tl256-ty3000-th96.py create mode 100755 testcase/sysbench/tperf-sysbench-tl256-ty4000-th85.py create mode 100755 testcase/sysbench/tperf-sysbench-tl256-ty4000-th96.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty1000-th19.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty1000-th32.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty1000-th45.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty1000-th59.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty1000-th6.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty1000-th72.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty2000-th19.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty2000-th32.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty2000-th45.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty2000-th59.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty2000-th6.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty2000-th72.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty3000-th19.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty3000-th32.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty3000-th45.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty3000-th59.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty3000-th6.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty3000-th72.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty4000-th19.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty4000-th32.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty4000-th45.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty4000-th59.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty4000-th6.py create mode 100755 testcase/sysbench/tperf-sysbench-tl4-ty4000-th72.py create mode 100755 testcase/sysbench/tperf-sysbench-tl512-ty1000-th111.py create mode 100755 testcase/sysbench/tperf-sysbench-tl512-ty1000-th124.py create mode 100755 testcase/sysbench/tperf-sysbench-tl512-ty2000-th111.py create mode 100755 testcase/sysbench/tperf-sysbench-tl512-ty2000-th124.py create mode 100755 testcase/sysbench/tperf-sysbench-tl512-ty3000-th111.py create mode 100755 testcase/sysbench/tperf-sysbench-tl512-ty3000-th124.py create mode 100755 testcase/sysbench/tperf-sysbench-tl512-ty4000-th111.py create mode 100755 testcase/sysbench/tperf-sysbench-tl512-ty4000-th124.py 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 0000000..c34d3e8 --- /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 0000000..af26a38 --- /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 0000000..7b925cb --- /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 0000000..ee62431 --- /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 0000000..ba7ae0c --- /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 0000000..e5e5802 --- /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 0000000..222372f --- /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 0000000..5199955 --- /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 0000000..c78f138 --- /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 0000000..b05d1f4 --- /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 0000000..6b9bd67 --- /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 0000000..847938d --- /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 0000000..68f32e0 --- /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 0000000..ac4a7fb --- /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 0000000..771ebc3 --- /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 0000000..c0528d4 --- /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 0000000..3eadc85 --- /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 0000000..960ae2b --- /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 0000000..450973d --- /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 0000000..3688c03 --- /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 0000000..7ee6e04 --- /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 0000000..9d9e6f6 --- /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 0000000..7f707cb --- /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 0000000..7c37ce3 --- /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 0000000..4f5201a --- /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 0000000..4a8d72d --- /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 0000000..7368f08 --- /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 0000000..88dd2f9 --- /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 0000000..033f5e4 --- /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 0000000..b71fbf0 --- /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 0000000..188ae3e --- /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 0000000..684590c --- /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 0000000..0e87d41 --- /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 0000000..e76b700 --- /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 0000000..5e304ed --- /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 0000000..9d708f1 --- /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 0000000..0efc82c --- /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 0000000..3b66911 --- /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 0000000..d87e689 --- /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 0000000..82619b4 --- /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/tperf-sysbench-tl256-ty1000-th85.py b/testcase/sysbench/tperf-sysbench-tl256-ty1000-th85.py new file mode 100755 index 0000000..ff00a68 --- /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 0000000..60f8a57 --- /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 0000000..237d13f --- /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 0000000..be9b826 --- /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 0000000..bebaa16 --- /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 0000000..4003cd4 --- /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 0000000..51e371d --- /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 0000000..bfb082c --- /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 0000000..d81b9de --- /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 0000000..15468fe --- /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 0000000..3664266 --- /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 0000000..29888df --- /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 0000000..82bb2d7 --- /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 0000000..e64e125 --- /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 0000000..b623a56 --- /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 0000000..c46e5f3 --- /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 0000000..cca4ddb --- /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 0000000..7354e83 --- /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 0000000..e58c402 --- /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 0000000..55ccf20 --- /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 0000000..cc4808c --- /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 0000000..6489c23 --- /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 0000000..20260f7 --- /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 0000000..06fd86e --- /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 0000000..5abde75 --- /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 0000000..c12f591 --- /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 0000000..eb0380f --- /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 0000000..037c6bd --- /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 0000000..0b3d4b9 --- /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 0000000..5387624 --- /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 0000000..512b6c0 --- /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 0000000..764c735 --- /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 0000000..3590aec --- /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 0000000..30ef3e4 --- /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 0000000..ed02197 --- /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 0000000..50f50b4 --- /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 0000000..ee7d9e1 --- /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 0000000..0c01ab0 --- /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 0000000..0906537 --- /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 0000000..c9d1f87 --- /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) -- Gitee