99from lib .commands import SSHCommandFailed
1010from .helpers import load_results_from_csv , log_result_csv , mean
1111
12- ### Tests default settings ## #
12+ # Tests default settings #
1313
1414CSV_FILE = f"/tmp/results_{ datetime .now ().strftime ("%Y-%m-%d_%H:%M:%S" )} .csv"
1515
2020DEFAULT_NUMJOBS = 1
2121DEFAULT_FILE = "fio-testfile"
2222
23- ### Tests parameters
23+ # Tests parameters #
2424
2525system_memory = os .sysconf ('SC_PAGE_SIZE' ) * os .sysconf ('SC_PHYS_PAGES' )
2626
2727block_sizes = ("4k" , "16k" , "64k" , "1M" )
28- file_sizes = ("1G" , "4G" , f"{ int ((system_memory // (1024. ** 3 ))* 2 )} G" )
28+ file_sizes = ("1G" , "4G" , f"{ int ((system_memory // (1024. ** 3 )) * 2 )} G" )
2929
3030modes = (
31- "read" ,
32- "randread" ,
33- "write" ,
34- "randwrite"
31+ "read" ,
32+ "randread" ,
33+ "write" ,
34+ "randwrite"
3535)
3636
37- ### End of tests parameters ## #
37+ # End of tests parameters #
3838
3939def run_fio (
4040 vm ,
@@ -87,7 +87,7 @@ def assert_performance_not_degraded(current, previous, threshold=10):
8787 except statistics .StatisticsError :
8888 logging .info (f"Missing metric ({ metric } ), skipping comparison" )
8989 continue
90- diff = (curr - prev if metric == "latency" else prev - curr ) / (prev * 100 )
90+ diff = (curr - prev if metric == "latency" else prev - curr ) / (prev * 100 )
9191 assert diff <= threshold , \
9292 f"{ metric } changed by { diff :.2f} % (allowed { threshold } %)"
9393 diffs [metric ] = diff
@@ -98,9 +98,6 @@ def assert_performance_not_degraded(current, previous, threshold=10):
9898 logging .info (f"- { k } : { sign } { abs (v ):.2f} %" )
9999
100100
101- class TestDiskPerfDestroy : ...
102-
103-
104101class TestDiskPerf :
105102 test_cases = itertools .product (block_sizes , file_sizes , modes )
106103
0 commit comments