From: Vincent Fu Date: Fri, 29 Jul 2016 21:07:06 +0000 (-0400) Subject: Clear up white space errors X-Git-Tag: fio-2.16~3^2~29 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=bfc4884ea2d7847675c27c7bc0458ff5f614735d Clear up white space errors --- diff --git a/init.c b/init.c index 7be31a14..e9bf3a2b 100644 --- a/init.c +++ b/init.c @@ -1586,7 +1586,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, /* put all steady state info in one place */ td->ss.dur = o->ss_dur; - td->ss.limit = o->ss_limit.u.f; + td->ss.limit = o->ss_limit.u.f; td->ss.ramp_time = o->ss_ramp_time; td->ss.pct = o->ss_pct; diff --git a/steadystate.c b/steadystate.c index 3b9b6ef7..85e259a0 100644 --- a/steadystate.c +++ b/steadystate.c @@ -84,7 +84,7 @@ void steadystate_check() fio_gettime(&now, NULL); if (ss->ramp_time && !ss->ramp_time_over) - /* + /* * Begin recording data one second after ss->ramp_time * has elapsed */ @@ -101,7 +101,7 @@ void steadystate_check() rate_time = mtime_since(&ss->prev_time, &now); memcpy(&ss->prev_time, &now, sizeof(now)); - /* + /* * Begin monitoring when job starts but don't actually use * data in checking stopping criterion until ss->ramp_time is * over. This ensures that we will have a sane value in @@ -110,7 +110,7 @@ void steadystate_check() */ if (ss->ramp_time_over) { group_bw += 1000 * (td_bytes - ss->prev_bytes) / rate_time; - group_iops += 1000 * (td_iops - ss->prev_iops) / rate_time; + group_iops += 1000 * (td_iops - ss->prev_iops) / rate_time; ++group_ramp_time_over; } ss->prev_iops = td_iops; @@ -123,7 +123,7 @@ void steadystate_check() if (!group_ramp_time_over) continue; - dprint(FD_STEADYSTATE, "steadystate_check() thread: %d, groupid: %u, rate_msec: %ld, iops: %lu, bw: %lu, head: %d, tail: %d\n", + dprint(FD_STEADYSTATE, "steadystate_check() thread: %d, groupid: %u, rate_msec: %ld, iops: %lu, bw: %lu, head: %d, tail: %d\n", i, td->groupid, rate_time, group_iops, group_bw, ss->head, ss->tail); if (ss->evaluate(group_iops, group_bw, td)) @@ -223,7 +223,7 @@ bool steadystate_deviation(unsigned long iops, unsigned long bw, struct thread_d ss->deviation = 0.0; for (i = 0; i < ss->dur; i++) - { + { diff = (double) (ss->check_iops ? ss->iops_data[i] : ss->bw_data[i]) - mean; ss->deviation = max(ss->deviation, diff * (diff < 0.0 ? -1.0 : 1.0)); } diff --git a/steadystate.h b/steadystate.h index 31e5c3fc..7a1fecdb 100644 --- a/steadystate.h +++ b/steadystate.h @@ -7,4 +7,3 @@ extern void steadystate_alloc(struct thread_data *); extern bool steadystate_deviation(unsigned long, unsigned long, struct thread_data *); extern bool steadystate_slope(unsigned long, unsigned long, struct thread_data *); #endif - diff --git a/unit_tests/steadystate_tests.py b/unit_tests/steadystate_tests.py index 845f008b..d9d7f246 100755 --- a/unit_tests/steadystate_tests.py +++ b/unit_tests/steadystate_tests.py @@ -71,17 +71,17 @@ if __name__ == '__main__': # # test option parsing # - parsing = [ { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=iops:10", "--ss_ramp=5"], + parsing = [ { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=iops:10", "--ss_ramp=5"], 'output': "set steady state IOPS threshold to 10.000000" }, - { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=iops:10%", "--ss_ramp=5"], + { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=iops:10%", "--ss_ramp=5"], 'output': "set steady state threshold to 10.000000%" }, - { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=iops:.1%", "--ss_ramp=5"], + { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=iops:.1%", "--ss_ramp=5"], 'output': "set steady state threshold to 0.100000%" }, - { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=bw:10%", "--ss_ramp=5"], + { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=bw:10%", "--ss_ramp=5"], 'output': "set steady state threshold to 10.000000%" }, - { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=bw:.1%", "--ss_ramp=5"], + { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=bw:.1%", "--ss_ramp=5"], 'output': "set steady state threshold to 0.100000%" }, - { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=bw:12", "--ss_ramp=5"], + { 'args': ["--parse-only", "--debug=parse", "--ss_dur=10s", "--ss=bw:12", "--ss_ramp=5"], 'output': "set steady state BW threshold to 12" }, ] for test in parsing: @@ -137,8 +137,8 @@ if __name__ == '__main__': tf = tempfile.NamedTemporaryFile(delete=False) tf.close() - output = subprocess.check_output([args.fio, - "--output-format=json", + output = subprocess.check_output([args.fio, + "--output-format=json", "--output={0}".format(tf.name)] + accum) with open(tf.name, 'r') as source: jsondata = json.loads(source.read()) @@ -169,7 +169,6 @@ if __name__ == '__main__': line = 'PASSED ' + line + ' target {0} < limit {1}, data {2}'.format(target, suite[jobnum]['ss_limit'], job['steadystate']) else: line = 'FAILED ' + line + ' target {0} < limit {1} but fio reports ss not attained, data: {2}'.format(target, suite[jobnum]['ss_limit'], job['steadystate']) - else: # check runtime, confirm criterion calculation, and confirm that criterion was not met expected = suite[jobnum]['timeout'] * 1000