]> git.hungrycats.org Git - bees/commit
heatmap: a generic power-of-two 2D event collector
authorZygo Blaxell <bees@furryterror.org>
Sun, 14 Jun 2026 03:54:11 +0000 (23:54 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sun, 30 Aug 2026 23:48:46 +0000 (19:48 -0400)
commite05ffb0c245e62aeef35401e55aa765fabbd6345
tree2fa1f8bf97b8e19bef3c74f9f5ec354274383ab6
parent144e5edb54619acd80ac3da113c67f214a7e0b3a
heatmap: a generic power-of-two 2D event collector

A small self-contained collector for counting events bucketed by an integer
magnitude (e.g. a region or boundary count) against an elapsed time, both on
floor(log2) axes.  add() is lock-free; print() renders the populated sub-grid
with per-row and per-column totals, so the time-axis marginal is a plain
power-of-two-seconds histogram and the magnitude marginal is its dual.

It carries no bees/crucible dependencies so one collector can back several
unrelated metrics — e.g. an algorithm-specific boundary count and an
algorithm-agnostic input-region count against the same elapsed time.

Assisted-by: Claude-Code:claude-opus-4-8
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/Makefile
src/bees-heatmap.cc [new file with mode: 0644]
src/bees-heatmap.h [new file with mode: 0644]