profiler

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profiler

type Profiler struct {
	// contains filtered or unexported fields
}

Profiler tracks frame rate and memory statistics for performance monitoring. Outputs stats to the log at a configurable interval.

func NewProfiler

func NewProfiler() *Profiler

NewProfiler creates a new Profiler with default settings. Update interval defaults to 1 second.

Returns:

  • *Profiler: the newly created profiler instance

func (*Profiler) Tick

func (p *Profiler) Tick() bool

Tick should be called once per frame to track frame timing. Logs performance statistics when the update interval has elapsed. Statistics include: FPS, heap usage, allocation rate, GC count/pause times, total memory.

Returns:

  • bool: true if stats were logged this tick, false otherwise

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL