From 276be9ebd1ca9b46b0ac5b757259c82964822882 Mon Sep 17 00:00:00 2001 From: Chris Harris Date: Fri, 7 Feb 2025 16:34:36 +0000 Subject: [PATCH 1/3] Post processing fix for total_iodepth runs Signed-off-by: Chris Harris (harriscr@uk.ibm.com) --- post_processing/formatter/test_run_result.py | 27 +++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/post_processing/formatter/test_run_result.py b/post_processing/formatter/test_run_result.py index 71a6ceb9..fc5a7ab0 100644 --- a/post_processing/formatter/test_run_result.py +++ b/post_processing/formatter/test_run_result.py @@ -86,7 +86,9 @@ def _convert_file(self, file_path: Path) -> None: with open(str(file_path), "r", encoding="utf8") as file: data: dict[str, Any] = json.load(file) - iodepth: str = f"{data['global options']['iodepth']}" + iodepth: str = self._get_iodepth( + f"{data['global options']['iodepth']}", f"{data['global options']['write_iops_log']}" + ) blocksize: str = f"{data['global options']['bs']}" operation: str = f"{data['global options']['rw']}" global_details: IODEPTH_DETAILS_TYPE = self._get_global_options(data["global options"]) @@ -305,3 +307,26 @@ def _sum_standard_deviation_values( ) return latency_standard_deviation + + def _get_iodepth(self, iodepth_value: str, logfile_name: str) -> str: + """ + Checks to see if the iodepth encoded in the logfile name matches + the iodepth in the output file. If it does, return the iodepth + from the file, otherwise return the iodepth parsed from the + log file path + """ + iodepth: int = int(iodepth_value) + + # the logfile name is of the format: + # /tmp/cbt/00000000/LibrbdFio/randwrite_1048576/iodepth-001/numjobs-001/output.0 + iodepth_start_index: int = logfile_name.find("iodepth") + # an index of -1 is no match found, so do nothing + if iodepth_start_index != -1: + iodepth_end_index: int = iodepth_start_index + len("iodepth") + iodepth_string: str = logfile_name[iodepth_end_index + 1 : iodepth_end_index + 4] + logfile_iodepth: int = int(iodepth_string) + + if logfile_iodepth > iodepth: + iodepth = logfile_iodepth + + return str(iodepth) From 6f6dffac6ae41b4d02ab7b59607c92dc94159ade Mon Sep 17 00:00:00 2001 From: Chris Harris Date: Fri, 7 Feb 2025 16:34:36 +0000 Subject: [PATCH 2/3] Post processing fix for total_iodepth runs Signed-off-by: Chris Harris (harriscr@uk.ibm.com) --- post_processing/formatter/test_run_result.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/post_processing/formatter/test_run_result.py b/post_processing/formatter/test_run_result.py index fc5a7ab0..59cf979b 100644 --- a/post_processing/formatter/test_run_result.py +++ b/post_processing/formatter/test_run_result.py @@ -330,3 +330,5 @@ def _get_iodepth(self, iodepth_value: str, logfile_name: str) -> str: iodepth = logfile_iodepth return str(iodepth) + + __test__ = False From 4cd22ee750d820f80c84dad40cc8921f6aa572aa Mon Sep 17 00:00:00 2001 From: Chris Harris Date: Fri, 7 Feb 2025 16:34:36 +0000 Subject: [PATCH 3/3] Post processing fix for total_iodepth runs Signed-off-by: Chris Harris (harriscr@uk.ibm.com) --- post_processing/formatter/test_run_result.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/post_processing/formatter/test_run_result.py b/post_processing/formatter/test_run_result.py index 59cf979b..d85aadea 100644 --- a/post_processing/formatter/test_run_result.py +++ b/post_processing/formatter/test_run_result.py @@ -320,10 +320,11 @@ def _get_iodepth(self, iodepth_value: str, logfile_name: str) -> str: # the logfile name is of the format: # /tmp/cbt/00000000/LibrbdFio/randwrite_1048576/iodepth-001/numjobs-001/output.0 iodepth_start_index: int = logfile_name.find("iodepth") + numjobs_start_index: int = logfile_name.find("numjobs") # an index of -1 is no match found, so do nothing - if iodepth_start_index != -1: + if iodepth_start_index != -1 and numjobs_start_index != -1: iodepth_end_index: int = iodepth_start_index + len("iodepth") - iodepth_string: str = logfile_name[iodepth_end_index + 1 : iodepth_end_index + 4] + iodepth_string: str = logfile_name[iodepth_end_index + 1 : numjobs_start_index - 1] logfile_iodepth: int = int(iodepth_string) if logfile_iodepth > iodepth: