Fix test mode in I/O benchmark test
This commit is contained in:
parent
49ed3c2919
commit
3d799c2b62
1 changed files with 6 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue