projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d59d31a
)
Stat summation fixup
author
Jens Axboe
<jens.axboe@oracle.com>
Tue, 6 Mar 2007 14:37:00 +0000
(15:37 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Tue, 6 Mar 2007 14:37:00 +0000
(15:37 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
stat.c
patch
|
blob
|
blame
|
history
diff --git
a/stat.c
b/stat.c
index 5470c87f226d56dffa27f6a3f4c8f60c0d30dfff..07c9b62e26907bd8dbd8f8d4b72203a90a868a96 100644
(file)
--- a/
stat.c
+++ b/
stat.c
@@
-579,8
+579,8
@@
static void __sum_stat(struct io_stat *dst, struct io_stat *src, int nr)
mean = src->mean;
S = src->S;
} else {
- mean = ((src->mean * (double)
nr) + dst->mean) / ((double) nr + 1.0
);
- S = ((src->S * (double)
nr) + dst->S) / ((double) nr + 1.0
);
+ mean = ((src->mean * (double)
(nr - 1)) + dst->mean) / ((double) nr
);
+ S = ((src->S * (double)
(nr - 1)) + dst->S) / ((double) nr
);
}
dst->mean = mean;