From d199899dc1460d9dd72c6fca343f0030d632a635 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 12 May 2026 23:18:18 +0300 Subject: add DefaultTopN constant to statsengine and replace hard-coded 64 capacity values Introduces statsengine.DefaultTopN = 64 as the canonical named constant for the top-N capacity used when constructing an Engine. Removes the local defaultEngineCapacity constant from runtime_builder.go and updates all call sites to reference statsengine.DefaultTopN instead of bare 64. Co-Authored-By: Claude Sonnet 4.6 --- internal/runtime_builder.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'internal/runtime_builder.go') diff --git a/internal/runtime_builder.go b/internal/runtime_builder.go index bc1c228..17a69c6 100644 --- a/internal/runtime_builder.go +++ b/internal/runtime_builder.go @@ -7,8 +7,6 @@ import ( "ior/internal/streamrow" ) -const defaultEngineCapacity = 64 - // runtimeComponents holds the freshly allocated trace-session components // produced by RuntimeBuilder.Build. All fields are non-nil after a successful // build. The caller is responsible for wiring these into the runtime bindings @@ -41,7 +39,7 @@ func newRuntimeBuilder(cfg flags.Config) RuntimeBuilder { // concurrent trace sessions. func (b RuntimeBuilder) Build() runtimeComponents { return runtimeComponents{ - engine: statsengine.NewEngine(defaultEngineCapacity), + engine: statsengine.NewEngine(statsengine.DefaultTopN), streamBuf: streamrow.NewRingBuffer(), streamSeq: streamrow.NewSequencer(0), liveTrie: flamegraph.NewLiveTrie(b.cfg.CollapsedFields, b.cfg.CountField), -- cgit v1.2.3