From 02fd0eded2ece41856f09fd1498d0b917d4394e0 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Mon, 27 Jul 2026 07:19:40 -0500 Subject: [PATCH] fix(fio): IOPS parser drops decimal values with '\d+' regex (+1 more) --- bobber/lib/analysis/fio.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bobber/lib/analysis/fio.py b/bobber/lib/analysis/fio.py index 9b3836a..2d99b03 100644 --- a/bobber/lib/analysis/fio.py +++ b/bobber/lib/analysis/fio.py @@ -21,7 +21,7 @@ def clean_iops(iops: str) -> float: float Returns a ``float`` of the final IOPS value in operations/second. """ - number = float(re.findall(r'\d+', iops)[0]) + number = float(re.findall(r'[-+]?\d+(?:\.\d+)?', iops)[0]) if 'G' in iops: ops_per_second = number * 1e9 elif 'M' in iops: @@ -249,8 +249,12 @@ def parse_fio_iops_file(log_files: list, systems: int, write_params) write_iops = fio_iops_results(log_contents, systems, 'write: IOPS=.*', log) + if write_iops == []: + continue read_iops = fio_iops_results(log_contents, systems, 'read: IOPS=.*', log) + if read_iops == []: + continue write_system_results[systems].append(sum(write_iops)) read_system_results[systems].append(sum(read_iops)) return read_system_results, write_system_results, read_params, write_params