From 47f0cc48db34b37d81540b31bf6adf11bb7b578d Mon Sep 17 00:00:00 2001 From: "ljzhang,Yaxin Hu,Jianchao Tang" Date: Thu, 26 Jul 2007 11:00:29 +0200 Subject: [PATCH] [PATCH] empty result 1. The job file looks like this: ---------runtime------------ [global] directory=./temp nrfiles=1 rw=randread size=32k thread [runtime] description="Too tiny a mission using less than 1sec." ---------------------------- Most of the time,it seems like no io has been performed: ---------------------------- nonggia@nonggia-desktop:~/fio$ fio runtime runtime: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1 Starting 1 thread runtime: (groupid=0, jobs=1): err= 0: pid=7155 Description : ["Too tiny a mission using less than 1sec."] cpu : usr=0.00%, sys=0.00%, ctx=1 IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0% issued r/w: total=8/0, short=0/0 lat (usec): 100=87.50%, 250=12.50% Run status group 0 (all jobs): Disk stats (read/write): sda: ios=8/0, merge=0/0, ticks=0/0, in_queue=0, util=0.00% nonggia@nonggia-desktop:~/fio$ ---------------------------- 2. Reason for the problem: It is so tiny a job that it may cost less than one second to finish.And the runtime is rounded down to 0.Just like the io never happened. We agree that the problem is really trifle, but for testing purpose, we think it maybe while the fixing. Signed-off-by: Jens Axboe --- fio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fio.c b/fio.c index bc837c44..792d4422 100644 --- a/fio.c +++ b/fio.c @@ -911,8 +911,8 @@ static void *thread_main(void *data) } update_rusage_stat(td); - td->ts.runtime[0] = runtime[0] / 1000; - td->ts.runtime[1] = runtime[1] / 1000; + td->ts.runtime[0] = (runtime[0] + 999) / 1000; + td->ts.runtime[1] = (runtime[1] + 999) / 1000; td->ts.total_run_time = mtime_since_now(&td->epoch); td->ts.io_bytes[0] = td->io_bytes[0]; td->ts.io_bytes[1] = td->io_bytes[1]; -- 2.25.1