From 4b43f54ed7dece502350658bee10eba551aeb4a4 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 19 Jul 2007 21:38:35 +0200 Subject: [PATCH] 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 --- stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1