src/utils_cache.[ch]: Added a global cache for all values that are dispatched.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 28 Oct 2007 15:46:58 +0000 (16:46 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 28 Oct 2007 15:46:58 +0000 (16:46 +0100)
commitaed8c4a152fc95c52fb913834b847942eadc2c67
treeea607896292c6cc3e36e5815e2466cdb3f583584
parentbc6790409971d84b1c8aa7201667c869e155e03b
src/utils_cache.[ch]: Added a global cache for all values that are dispatched.

The cache translates counter values to gauge values using the last counter
value available. This can then be used to check against threshold values, as
we'll need to do for monitoring functionality.

Right now the cache doesn't do much: It sits there and caches the values, but
is not yet ever queried. The already implemented (but so far unused) function
`uc_get_rate' returns an array of gauge_t values.

The longterm goal is to have the network, rrdtool and unixsock plugins use this
cache, too. This will require some `plugin specific' data with appropriate
control structures and, which is likely the hardest part, some clever locking
for all that.
src/Makefile.am
src/plugin.c
src/utils_cache.c [new file with mode: 0644]
src/utils_cache.h [new file with mode: 0644]