Blackbox (AKA Lib: Blackbox) works much like the black box in an airplane - it records position, buffs, debuffs, heals, and damage in a 30 second loop that is saved whenever anyone dies.
The primary purpose of Blackbox is to have both a way to export data about deaths to external tools, and to have a single optimized library for death reports.
One optimization that Blackbox does is that it has very, very little allocation during combat. All calls during combat are O(1) (unless there's overflow - ie if you have a very, very busy raid your first few fights may incur some allocation). Blackbox waits to process death information until after you are out of combat.
The result is that you should see very little CPU use and no garbage collection calls from Blackbox.
This is an alpha upload. There are a few things remaining to do before the library is usable by the general public.
- Easy library access
- Configurable loop duration
- Expirations
- Combat log message inclusion
Another element that may interest programmers is that Blackbox is written in a code-by-contract style using macros. If you have access to CPP, they're easily used. Take a look at the Makefile and contract.h. All WoW addon developers have experienced the "...how the hell did THAT happen?" effect, and this is a good way of detecting bad errors as soon as possible. Please note, however, that because of my paranoia during coding (it paid off), alpha versions run very slowly - they run all checks.
If there is interest, I'll see about packaging up ringbuffer.lua and stackbuffer.lua for others to easily include.
