summaryrefslogtreecommitdiff
path: root/internal/runtime_builder.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-12 23:18:18 +0300
committerPaul Buetow <paul@buetow.org>2026-05-12 23:18:18 +0300
commitd199899dc1460d9dd72c6fca343f0030d632a635 (patch)
treed59a43f2c25727ca296b74c8ca5b7387b56e70c6 /internal/runtime_builder.go
parent119c679dd16d6a3c89b9d37665c44815956b6f82 (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'internal/runtime_builder.go')
-rw-r--r--internal/runtime_builder.go4
1 files changed, 1 insertions, 3 deletions
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),