From: Jens Axboe Date: Thu, 19 Jul 2007 19:38:35 +0000 (+0200) Subject: Default stdev to 0.0, not -1.0 X-Git-Tag: fio-1.16.9~5 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=4b43f54ed7dece502350658bee10eba551aeb4a4 Default stdev to 0.0, not -1.0 If we only have a single sample, then the deviation is by definition 0. Signed-off-by: Jens Axboe --- diff --git a/stat.c b/stat.c index 28d85c18..38f94be0 100644 --- a/stat.c +++ b/stat.c @@ -82,7 +82,7 @@ static int calc_lat(struct io_stat *is, unsigned long *min, unsigned long *max, if (n > 1.0) *dev = sqrt(is->S / (n - 1.0)); else - *dev = -1.0; + *dev = 0; return 1; }