| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Adds a `mage parquetValidate` target that validates a Parquet recording
via clickhouse-local in Docker (schema presence, row count, seq/time_ns
sanity). Adds docs/parquet-querying.md with schema reference, invocation
pattern, and seven example queries with representative outputs.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
|
tui.Model (task 429)
tui.Model had 33 fields mixing keyboard tracking, filter chain, process
selection, and UI presentation concerns (SRP violation).
Extract three focused sub-structs:
- keyboardState (kb): enhancements, lastEvent{ID,At,WasPress},
suppress{ID,Until} — 7 fields managed by keys_normalize.go
- filterState (filter): global filter, history slice, label stack
— 3 fields for the trace filter chain
- processState (proc): pid, tid, pickerReturn
— 3 fields for PID/TID selection and picker navigation
Model drops from 33 to 23 top-level fields. All field accesses in
tui.go, keys_normalize.go, and tui_test.go are updated accordingly.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
|
(task 427/ISP)
TraceRuntimeBindings mixed 4 setter methods (injecting data into TUI) with
4 getter methods (reading persistent TUI-owned state), violating ISP.
Split into two focused interfaces:
- RuntimePublisher: SetDashboardSnapshotSource, SetEventStreamSource,
SetLiveTrie, SetProbeManager — the write/inject side
- RuntimeState: StreamBuffer, Recorder, StreamSequencer, FilterEpoch
— the read/persistent-state side
TraceRuntimeBindings now embeds both, preserving all existing call sites.
RuntimePublisherFromContext() added so callers that only inject data do not
see the getter surface. Three such callers are narrowed: setupBPFModule,
tuiTestFlamesStarter, tuiTestLiveFlamesStarter.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
|
ior.go had 763 lines covering 9+ concerns. Follow the eventloop_*.go
pattern and extract into three focused files:
- ior_bpfsetup.go: libbpfTracepoint{Program,Module} adapter types,
setupBPFModule, setupBPFModuleError, setupEventChannel
- ior_profiling.go: profilingControl type, setupProfiling,
profilingFilesForMode, stop()
- ior_parquet_sink.go: headlessParquetSink type, runHeadlessParquet,
isHeadlessParquetMode, hasHeadlessParquetContentFilters,
headlessParquetTraceConfig; inline parquetMetadata one-liner
ior.go shrinks from 763 → 453 lines, retaining entry, dispatch,
TUI wiring, and core trace execution.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
|
(task 429)
flags.Get() (global mutable singleton) was called inside library packages,
coupling them to global state and making tests fragile (DIP violation).
- internal.Run() now takes an explicit flags.Config; main.go calls
flags.Get() once at the CLI boundary and passes it in.
- tui.Run(), RunWithTraceStarter(), RunTestFlamesWithTraceStarter() removed;
callers already used the WithConfig variants directly.
- tui.NewModel() preserved for test ergonomics but now uses flags.NewFlags()
(pure defaults) instead of flags.Get() (global state).
- Tests updated to use NewModelWithConfig() with explicit config structs
instead of flags.Set*() + NewModel(), eliminating all test-level
global-state mutation.
flags.Get() is now called only in cmd/ior/main.go, the correct boundary.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
|
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>
|
|
(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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|