Skip to content

Commit 54a7172

Browse files
fix(disk_perf): styling and readability
Signed-off-by: Mathieu Labourier <[email protected]>
1 parent 5c9158b commit 54a7172

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/storage/benchmarks/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ def running_unix_vm_and_vbd(host, vdi_on_local_sr, running_unix_vm_with_fio):
7272

7373
@pytest.fixture(scope="module")
7474
def vm_with_vbd(running_unix_vm_and_vbd):
75-
vm, _vbd = running_unix_vm_and_vbd
75+
vm, _ = running_unix_vm_and_vbd
7676
return vm
7777

7878
@pytest.fixture(scope="module")
7979
def plugged_vbd(running_unix_vm_and_vbd):
80-
_vm, vbd = running_unix_vm_and_vbd
80+
_, vbd = running_unix_vm_and_vbd
8181
return vbd
8282

8383
@pytest.fixture(scope="module")

tests/storage/benchmarks/test_disk_perf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
system_memory = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')
2626

2727
block_sizes = ("4k", "16k", "64k", "1M")
28-
file_sizes = ("1G", "4G", f"{(system_memory/(1024.**3))*2}G")
28+
file_sizes = ("1G", "4G", f"{int((system_memory//(1024.**3))*2)}G")
29+
2930
modes = (
3031
"read",
3132
"randread",
@@ -139,7 +140,7 @@ def test_disk_benchmark(
139140
)
140141
summary = log_result_csv(test_type, rw_mode, result, CSV_FILE)
141142
assert summary["IOPS"] > 0
142-
results = load_results_from_csv(CSV_FILE)
143143
key = (test_type, rw_mode)
144144
if prev_results and key in prev_results:
145+
results = load_results_from_csv(CSV_FILE)
145146
assert_performance_not_degraded(results[key], prev_results[key])

0 commit comments

Comments
 (0)