From f0a1645ffefbdd34d8df7a563ee5d6f0c8616723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=AE=88=E4=B8=9A?= <1909237392@qq.com> Date: Fri, 8 May 2026 16:46:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dlmbench=E8=AE=A1=E7=AE=97?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 默认调用的self参数会传入到第一个参数,导致参数数量对不上。更新参数使用方法 175 errs: 176 Traceback (most recent call last): 177 File "/data/perf-test/gitee-tperf/common/lib/common.py", line 868, in tst_main 178 self._do_test(*args) 179 File "/data/perf-test/gitee-tperf/common/lib/common.py", line 746, in _do_test 180 self.do_test(*args) 181 File "/data/perf-test/gitee-tperf/./testcase/lmbench/tperf-lmbench-P1-bnlat_mem_rd-prefetch-on-ex-fi-mo-se-si256-st200 0.py", line 53, in do_test 182 self.perf_tool.run( 183 File "/data/perf-test/gitee-tperf/common/lib/benchmark.py", line 310, in run 184 data = self.parse_test_data() 185 ^^^^^^^^^^^^^^^^^^^^^^ 186 File "/data/perf-test/gitee-tperf/testcase/lmbench/lmbench.py", line 201, in parse_test_data 187 return self._impl.parse_test_data() 188 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 189 File "/data/perf-test/gitee-tperf/lib/ts_common.py", line 1290, in parse_test_data 190 result.extend(self.parse_result_mem_rd()) 191 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 192 File "/data/perf-test/gitee-tperf/lib/ts_common.py", line 1423, in parse_result_mem_rd 193 median_latency = round(self.manual_median(sub_list), 3) 194 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 195 TypeError: PerfLMbench.manual_median() takes 1 positional argument but 2 were given 196 197 this is tc_teardown 198 this is tc_teardown_common 199 Global test environment tear-down 200 RESULT : tperf-lmbench-P1-bnlat_mem_rd-prefetch-on-ex-fi-mo-se-si256-st2000 ==> [ FAILED ] 201 cost 267.350322300 --- lib/ts_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ts_common.py b/lib/ts_common.py index 0d1bc30..44cf22f 100644 --- a/lib/ts_common.py +++ b/lib/ts_common.py @@ -1420,7 +1420,7 @@ class PerfLMbench(TSTPerf): for i in range(1, len(index_list)): sub_list = lat_list[index_list[i - 1] : index_list[i]] if sub_list: - median_latency = round(self.manual_median(sub_list), 3) + median_latency = round(PerfLMbench.manual_median(sub_list), 3) result_list_values.append(median_latency) else: result_list_values.append(None) -- Gitee From 6a9910eed950466a50c635a61fd87e1ffd8ae499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=AE=88=E4=B8=9A?= <1909237392@qq.com> Date: Fri, 8 May 2026 16:49:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=99=8D=E4=BD=8Eunixbench=E8=BD=AE?= =?UTF-8?q?=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit unxibench的单用例测试需要3分钟左右,当前参数里面loop轮次为10,导致 测试总时间过长,降低测试时长 --- testcase/unixbench/tperf-unixbench-c1-teshell16.py | 2 +- testcase/unixbench/tperf-unixbench-c1-tespawn.py | 2 +- testcase/unixbench/unixbench-tune-mm.csv | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testcase/unixbench/tperf-unixbench-c1-teshell16.py b/testcase/unixbench/tperf-unixbench-c1-teshell16.py index b79ce10..23ba553 100755 --- a/testcase/unixbench/tperf-unixbench-c1-teshell16.py +++ b/testcase/unixbench/tperf-unixbench-c1-teshell16.py @@ -46,7 +46,7 @@ class PythonTestCase(MyTestCase): # @预期结果: 测试正常,性能数据采集正常 self.perf_tool.run( warmup=1, - run_loop=10, + run_loop=1, result_select_percent=80, ) self.perf_tool.report(testcase=self) diff --git a/testcase/unixbench/tperf-unixbench-c1-tespawn.py b/testcase/unixbench/tperf-unixbench-c1-tespawn.py index 1fdac20..971b210 100755 --- a/testcase/unixbench/tperf-unixbench-c1-tespawn.py +++ b/testcase/unixbench/tperf-unixbench-c1-tespawn.py @@ -46,7 +46,7 @@ class PythonTestCase(MyTestCase): # @预期结果: 测试正常,性能数据采集正常 self.perf_tool.run( warmup=1, - run_loop=10, + run_loop=1, result_select_percent=80, ) self.perf_tool.report(testcase=self) diff --git a/testcase/unixbench/unixbench-tune-mm.csv b/testcase/unixbench/unixbench-tune-mm.csv index 7e89ca7..6bbb042 100644 --- a/testcase/unixbench/unixbench-tune-mm.csv +++ b/testcase/unixbench/unixbench-tune-mm.csv @@ -1,4 +1,4 @@ # unixbench 用例稳定性参数配置 # 格式: 用例名称,warmup,run_loop,result_select_percent -tperf-unixbench-c1-tespawn,1,10,80 -tperf-unixbench-c1-teshell16,1,10,80 +tperf-unixbench-c1-tespawn,1,1,80 +tperf-unixbench-c1-teshell16,1,1,80 -- Gitee