Clear up white space errors
authorVincent Fu <Vincent.Fu@sandisk.com>
Fri, 29 Jul 2016 21:07:06 +0000 (17:07 -0400)
committerJens Axboe <axboe@fb.com>
Mon, 15 Aug 2016 15:44:52 +0000 (09:44 -0600)
init.c
steadystate.c
steadystate.h
unit_tests/steadystate_tests.py

diff --git a/init.c b/init.c
index 7be31a1..e9bf3a2 100644 (file)
--- 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;
 
index 3b9b6ef..85e259a 100644 (file)
@@ -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));
                }
index 31e5c3f..7a1fecd 100644 (file)
@@ -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
-
index 845f008..d9d7f24 100755 (executable)
@@ -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