summaryrefslogtreecommitdiff
path: root/internal/eventloop_error_handling_test.go
AgeCommit message (Collapse)Author
2026-03-18refactor: extract pairTracker and extend fdTracker to reduce eventLoop ↵Paul Buetow
responsibilities (task 428) The eventLoop struct held 20+ fields across 5+ responsibilities (SRP violation). Extract two cohesive sub-structs: - pairTracker: enter/exit pair matching, age-based LRU pruning, and DurationToPrev tracking. Replaces enterEvs/enterEvAges/prevPairTimes/ maxPendingEnterEvs/cacheAge fields with a single embedded value. - fdTracker (extended): absorbs procFdCache/procFdAges/maxProcFdCacheSize, moving all procfs-resolution cache logic (resolve, cache, prune, delete) off eventLoop and onto the tracker that already owns the fd table. eventLoop drops from 20 fields to 12. All methods that previously reached into eventLoop fields now live on the struct that owns the data. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-18refactor: replace reflect.TypeOf dispatch in exit handlers with type switch ↵Paul Buetow
(task 432) The exitHandlers map keyed by reflect.Type was a reflection-based dispatch table that incurred allocation and reflection overhead on every event pair in the hot processing path. Replace it with a plain type switch in handleTracepointExit, which the compiler resolves statically. Removes: initExitHandlers, typeKey, mustBeType, newTypedExitHandler, exitHandlerRegistry, the exitHandlers struct field, and the tracepointExitHandler type alias — all dead after the switch. Fixes a pre-existing uint→uint64 mismatch in stats(). Updates tests to target the new default branch directly. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-11eventloop: factor malformed-event helpers (task 383)Paul Buetow
2026-03-10task 434: unify trace filter plumbingPaul Buetow
2026-03-08tui: restore global filter stack and anchored matchesPaul Buetow
2026-03-08task(ior): harden malformed raw-event decoding (task ed7a7a3f)Paul Buetow
2026-03-06fix: return errors for invalid event filters (task 382)Paul Buetow
2026-03-01Route non-fatal event-loop warnings to TUIPaul Buetow