I reuse working tables quite a bit for a first pass, using something that approximates a ring buffer to avoid allocations / garbage collection.
Currently, this "library" is active all the time, recording from COMBAT_LOG_EVENT_UNFILTERED all the time, and runs calculations (just simple totals) on the recorded data every second. As mentioned, only the last 10 seconds are recorded.
I'm a big fan of addons like WeakAuras2 and TellMeWhen, and I build my own rotation helpers for classes that I have not mastered 100% (e.g. all of them). I've regularly lamented the lack of triggers useful for AoE rotations, hence my work here.
If you want to try this out, download it, install it, and copy the "libs" folder from Skada (I haven't got embedding libraries / packaging worked out yet). Also, you'll probably want to uncomment the `dumpState();` line at the bottom of the main .lua file.
I'd love some feedback on the desired API surface area before I proceed any further. Should I just expose a function that returns the `aggregates` table? Or just expose the aggregates table globally? Are other addon developers interested in integrating this library? What would make this more useful for others?