From e18cd48cda61d5c09b8be716e3b6f45e45f80c6b Mon Sep 17 00:00:00 2001 From: John Kariuki Date: Thu, 4 Nov 2021 13:40:31 -0700 Subject: [PATCH] scripts/nvmf_perf: fix matching result files When I use a single json config to run 4k and 64k together, the IOPS for the 4k test were lower than expected because the script is using metrics from both the 4k_64_randrw_m_100_* and 64k_64_randrw_m_100_* to calculate the average metrics because 4k_64_randrw_m_100_* is in 64k_64_randrw_m_100_*. Fixed issue by checking, if the result file startswith the name of the fio config file. Change-Id: I630385c34223b38694d7e2bb578779627c89866d Signed-off-by: John Kariuki Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10127 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Changpeng Liu Reviewed-by: Karol Latecki Reviewed-by: Maciej Wawryk --- scripts/perf/nvmf/run_nvmf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/perf/nvmf/run_nvmf.py b/scripts/perf/nvmf/run_nvmf.py index 916ac0550..c601d4ee6 100755 --- a/scripts/perf/nvmf/run_nvmf.py +++ b/scripts/perf/nvmf/run_nvmf.py @@ -519,7 +519,7 @@ class Target(Server): # If "_CPU" exists in name - ignore it # Initiators for the same job could have diffrent num_cores parameter job_name = re.sub(r"_\d+CPU", "", job_name) - job_result_files = [x for x in json_files if job_name in x] + job_result_files = [x for x in json_files if x.startswith(job_name)] self.log_print("Matching result files for current fio config:") for j in job_result_files: self.log_print("\t %s" % j)