From 3d799c2b6213d4a13cd8cd6449cbc4d281666ae7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 8 Oct 2022 22:05:54 -0700 Subject: [PATCH] Fix test mode in I/O benchmark test --- scripts/wk/hw/benchmark.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/wk/hw/benchmark.py b/scripts/wk/hw/benchmark.py index fd8e86db..3b6481e3 100644 --- a/scripts/wk/hw/benchmark.py +++ b/scripts/wk/hw/benchmark.py @@ -66,8 +66,6 @@ def calc_io_dd_values(dev_size, test_mode=False) -> dict[str, int]: test_mode limits the benchmark to IO_MINIMUM_TEST_SIZE (if possible) """ - if test_mode: - dev_size = min(IO_MINIMUM_TEST_SIZE, dev_size) read_total = min(IO_MINIMUM_TEST_SIZE, dev_size) read_total = max(read_total, dev_size*IO_ALT_TEST_SIZE_FACTOR) read_chunks = int(read_total // IO_CHUNK_SIZE) @@ -85,6 +83,12 @@ def calc_io_dd_values(dev_size, test_mode=False) -> dict[str, int]: # skip_extra_rate == 0 is fine pass + # Test mode + if test_mode: + read_chunks_limit = int(read_chunks * 0.1) + read_chunks_limit = (read_chunks_limit // IO_GRAPH_WIDTH) * IO_GRAPH_WIDTH + read_chunks = max(IO_GRAPH_WIDTH, read_chunks_limit) + # Done return { 'Read Chunks': read_chunks,