profile

package
v0.0.0-...-69d9917 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT, Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Package profile unifies the profiling api between Gio profiler and pkg/profile.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opt

type Opt string

Opt specifies the various profiling options.

const (
	None      Opt = "none"
	CPU       Opt = "cpu"
	Memory    Opt = "mem"
	Block     Opt = "block"
	Goroutine Opt = "goroutine"
	Mutex     Opt = "mutex"
	Trace     Opt = "trace"
	Gio       Opt = "gio"
)

func (Opt) NewProfiler

func (p Opt) NewProfiler() Profiler

NewProfiler creates a profiler based on the selected option.

type Profiler

type Profiler struct {
	Type     Opt
	Starter  func(p *profile.Profile)
	Stopper  func()
	Recorder func(gtx layout.Context)
}

Profiler unifies the profiling api between Gio profiler and pkg/profile.

func (Profiler) Record

func (pfn Profiler) Record(gtx layout.Context)

Record GUI stats per frame.

func (*Profiler) Start

func (pfn *Profiler) Start()

Start profiling.

func (*Profiler) Stop

func (pfn *Profiler) Stop()

Stop profiling.

Jump to

Keyboard shortcuts

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