Documentation
¶
Overview ¶
Package profiling supplies opt-in presentation diagnostics. Its wall-clock samples never drive gameplay, input acceptance, or animation decisions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Disable ¶
func Disable()
Disable stops collection without discarding a caller's completed snapshot.
func EndReadySelection ¶
EndReadySelection measures latest accepted arrow selection to its next Draw. Multiple accepted moves before a Draw coalesce; this is not OS keypress latency.
Types ¶
type Counter ¶
type Counter int
Counter identifies measured resource work, independently of sampled CPU time.
const ( FontCreates Counter = iota ProvisionFontRebuilds TextHits TextMisses TextEvictions ReadyRebuilds ReadySelections FontSourceParses TextLayoutBuilds TextCacheEntries TextCacheBytes TextCachePeakBytes TextCacheBypasses DitherBuilds OuterDitherBuilds )
Resource-work counters distinguish rebuilds from ordinary cached composition.
type DurationSummary ¶
type DurationSummary struct {
Count uint64 `json:"count"`
Samples int `json:"recentSamples"`
P50Ms float64 `json:"p50Ms"`
P95Ms float64 `json:"p95Ms"`
P99Ms float64 `json:"p99Ms"`
MaxMs float64 `json:"recentMaxMs"`
}
DurationSummary reports cumulative sample count and recent wall-time quantiles. Concurrent reads are an approximate rolling window, not an atomic frame trace.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics holds bounded samples and counters safe to read from the profile server.
type Snapshot ¶
type Snapshot struct {
Counters map[string]uint64 `json:"counters"`
Update DurationSummary `json:"update"`
ContentDraw DurationSummary `json:"contentDraw"`
ReadySelectionNextDraw DurationSummary `json:"readySelectionNextDraw"`
}
Snapshot contains only counters/timing storage, never live game state.