profile

package
v0.0.0-...-d6fc143 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2014 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColCPU        = 0
	ColLiveObj    = 0
	ColLiveBytes  = 1
	ColAllocObj   = 2
	ColAllocBytes = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	FuncStats map[uint64]*StatItem // stats per PC.
	// contains filtered or unexported fields
}

A ReporterTransfer is used to transfer reports from client to play-prof server.

func NewMetrics

func NewMetrics() *Metrics

func (*Metrics) Add

func (m *Metrics) Add(trace []uint64, count ...int64) error

Add registers data for a given stack trace. There may be at most 4 count arguments, as needed in heap profiles.

func (*Metrics) Symbols

func (m *Metrics) Symbols() (as []uint64)

type Profile

type Profile struct {
	Metrics  *Metrics
	Resolver *Resolver
}

func NewProfile

func NewProfile() *Profile

func (*Profile) LoadProfileFromFiles

func (prof *Profile) LoadProfileFromFiles(exeFile string, profFile string, appId int64) error

func (*Profile) ProfileByUrl

func (prof *Profile) ProfileByUrl(sourceUrl string, appId int64) error

func (*Profile) Serialise

func (prof *Profile) Serialise() ([]byte, error)

func (*Profile) Unserialise

func (prof *Profile) Unserialise(source []byte) error

type Resolver

type Resolver struct {
	Symbols map[uint64]string
}

func NewResolver

func NewResolver() *Resolver

func (*Resolver) LoadSymbols

func (r *Resolver) LoadSymbols(symbolsData []byte) error

func (*Resolver) LoadSymbolsFromExeFile

func (r *Resolver) LoadSymbolsFromExeFile(addresses []uint64, filename string) error

func (*Resolver) Resolve

func (r *Resolver) Resolve(addr uint64) string

type StatItem

type StatItem struct {
	Self    [4]int64
	Cumul   [4]int64
	Callees map[uint64][4]int64
}

Jump to

Keyboard shortcuts

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