engine: github.com/g3n/engine/util/stats Index | Files

package stats

import "github.com/g3n/engine/util/stats"


Package Files

stats.go table.go

type Stats Uses

type Stats struct {
    Glstats    gls.Stats // GLS statistics structure
    UnilocHits int       // Uniform location cache hits per frame
    UnilocMiss int       // Uniform location cache misses per frame
    Unisets    int       // Uniform sets per frame
    Drawcalls  int       // Draw calls per frame
    Cgocalls   int       // Cgo calls per frame
    // contains filtered or unexported fields

Stats contains several statistics useful for performance evaluation

func NewStats Uses

func NewStats(gs *gls.GLS) *Stats

NewStats creates and returns a pointer to a new statistics object

func (*Stats) Update Uses

func (s *Stats) Update(d time.Duration) bool

Update should be called in the render loop with the desired update interval. Returns true when the interval has elapsed and the statistics has been updated.

type StatsTable Uses

type StatsTable struct {
    *gui.Table // embedded table panel
    // contains filtered or unexported fields

StatsTable is a gui.Table panel with statistics

func NewStatsTable Uses

func NewStatsTable(width, height float32, gs *gls.GLS) *StatsTable

NewStatsTable creates and returns a pointer to a new statistics table panel

func (*StatsTable) Update Uses

func (st *StatsTable) Update(s *Stats)

Update updates the table values from the specified stats table

Package stats imports 4 packages (graph) and is imported by 2 packages. Updated 2018-05-15. Refresh now. Tools for package owners.