Example: Read the amount of copper ore in a certain chest once a second and store it. An hour later I want to know what the average amount of copper ore was during every minute of the last hour.
Why? To fill a graph like this with data:
Functionality I need:
- set_count(key, value) - should set the count for key and the current tick to value
- get_count_array(key, first_tick, last_tick, N) - should return an array of size N, with averaged values for key in the interval between first_tick and last_tick
Any suggestions on how to tackle this without killing performance or blowing up save file size?