fix early termination of runs caused by ramp_time > runtime
authorSteven Noonan <snoonan@amazon.com>
Mon, 30 Jan 2012 21:34:04 +0000 (13:34 -0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 31 Jan 2012 12:55:00 +0000 (13:55 +0100)
If ramp_time was longer than the runtime, then the run terminated immediately
after the ramp_time was exceeded. In order to avoid this, teach
runtime_exceeded about ramp_time.

Signed-off-by: Steven Noonan <snoonan@amazon.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fio.c

diff --git a/fio.c b/fio.c
index 77e5572ba02aa1bf8129f80f3825d8cf962b229b..7aa55a8f7839bdbb3f08f192cf4990932e4da25f 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -343,6 +343,8 @@ static int check_min_rate(struct thread_data *td, struct timeval *now,
 
 static inline int runtime_exceeded(struct thread_data *td, struct timeval *t)
 {
+       if (in_ramp_time(td))
+               return 0;
        if (!td->o.timeout)
                return 0;
        if (mtime_since(&td->epoch, t) >= td->o.timeout * 1000)