author | Florian Forster <octo@collectd.org> | |
Sun, 12 Jan 2014 09:25:29 +0000 (10:25 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sun, 12 Jan 2014 09:53:13 +0000 (10:53 +0100) | ||
commit | ef74a29dbccd4e4de2633893b662c321af3b2ec4 | |
tree | bcd56d46db6a63cc4d1efd5338e9062a8d5c24f5 | tree | snapshot |
parent | 249e7ed3ecab84a1355404a02f5314c33b8b575b | commit | diff |
swap plugin: Improvements for the percent code:
* Don't rely on the left-to-right evaluation order, i.e. move the
division to the right.
* Avoid casting by making many of the internally used variables gauge_t.
They were derive_t in many cases for historical reasons that no longer
apply.
* Change the naming: Don't use the "swap" type for percentages (putting
the information that it *is* a percentage into the type instance) and
use "percent" instead.
* Don't rely on the left-to-right evaluation order, i.e. move the
division to the right.
* Avoid casting by making many of the internally used variables gauge_t.
They were derive_t in many cases for historical reasons that no longer
apply.
* Change the naming: Don't use the "swap" type for percentages (putting
the information that it *is* a percentage into the type instance) and
use "percent" instead.
src/swap.c | diff | blob | history |