> Code looks awesome. For reference, they're storing the last N samples
> with each time point over a given time period. Ie, they store the
> current counter values once a second.

I haven't looked at the code and might be speaking out of my arse here
but have you looked at how rrdtool stores samples? It's quite
interesting as it uses constant space and doesn't throw away anything.
To achieve constant space it sacrifices granularity as in: once the
time window as passed instead of dropping old samples it averages them
and stores a single data point for the average (or something along
those lines). FWIW it might be worth looking at how rrdtool does it :)

http://oss.oetiker.ch/rrdtool/doc/rrdtool.en.html <-- look at the "How
does rrdtool work?" section.

U

Reply via email to