Diese Seite ist noch nicht auf Deutsch übersetzt und wird daher auf Englisch angezeigt.
Weiteresessionstats
github.com/nsgo-dev/game/pkg/sessionstats records release-safe frame pacing without the debug overlay. Feed completed frame durations to Recorder.Observe, then read Summary for p50/p95/p99, longest frame, frames at least twice the target interval, peak heap, runtime memory and GC cycles/pause observations. The recorder uses a fixed ring and can be sampled from a release build.
recorder := sessionstats.New(time.Second / 60)
loop.FrameTime = func(dt time.Duration) { recorder.Observe(dt) }
cx.Effect(func() {
recorder.SetPaused(cx.Env().Lifecycle() == core.LifecycleBackground)
})
SetPaused(true) excludes frames while the app is backgrounded, so a platform resume does not look like a gameplay stall. Cave Run and Starburst expose the recorder on their controllers and verify that a release-safe summary is populated in their headless tests. Summary has a versioned, deterministic JSON and YAML representation for a session-end analytics event or a local diagnostic report.