projects
/
openwrt
/
staging
/
ansuel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab55cf8
)
wprobe: fix moving average
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 29 Mar 2009 02:12:47 +0000
(
02:12
+0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 29 Mar 2009 02:12:47 +0000
(
02:12
+0000)
SVN-Revision: 15064
package/wprobe/src/kernel/wprobe-core.c
patch
|
blob
|
history
diff --git
a/package/wprobe/src/kernel/wprobe-core.c
b/package/wprobe/src/kernel/wprobe-core.c
index 03e9049464dc86c174f0a72ef7e4f5db2e6bbdfa..798cd7ddec1c70d7c6101ea3bab743d4297fe3ea 100644
(file)
--- a/
package/wprobe/src/kernel/wprobe-core.c
+++ b/
package/wprobe/src/kernel/wprobe-core.c
@@
-448,10
+448,10
@@
wprobe_scale_stats(const struct wprobe_item *item, struct wprobe_value *val, int
else if (wprobe_fam.attrbuf[WPROBE_ATTR_SCALE])
scale = nla_get_u32(wprobe_fam.attrbuf[WPROBE_ATTR_SCALE]);
- if ((scale > 0) && (val[i].n >
=
scale)) {
+ if ((scale > 0) && (val[i].n > scale)) {
val[i].s = div_s64(val[i].s, scale);
val[i].ss = div_s64(val[i].ss, scale);
- val[i].n
/= scale
;
+ val[i].n
= val[i].n / scale + 1
;
}
}
}