parser

package
v0.0.0-...-8bcb337 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2016 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CpuProfParser

type CpuProfParser struct {
	R      *bufio.Reader
	Order  binary.ByteOrder
	Size   int
	Period uint64 // profiling period in µs.
	// contains filtered or unexported fields
}

func NewCpuProfParser

func NewCpuProfParser(r io.Reader) (*CpuProfParser, error)

func (*CpuProfParser) ReadTrace

func (p *CpuProfParser) ReadTrace() ([]uint64, uint64, error)

ReadTrace returns a stack trace from the CPU profile. The returned slice becomed invalid after the next call to ReadTrace.

type HeapProfParser

type HeapProfParser struct {
	R *bufio.Reader

	Freq int64
	// Total.
	LiveObj    int64
	LiveBytes  int64
	AllocObj   int64
	AllocBytes int64
	// contains filtered or unexported fields
}

func NewHeapProfParser

func NewHeapProfParser(r io.Reader) (*HeapProfParser, error)

func (*HeapProfParser) AdjustRecord

func (p *HeapProfParser) AdjustRecord(rec *HeapRecord, symtable func(uint64) string)

AdjustRecord modifies a heap profile record according to the MemProfileRate to give an estimate of the real memory usage. It also cleans up irrelevant parts of the stack trace like calls to runtime.new.

func (*HeapProfParser) ReadRecord

func (p *HeapProfParser) ReadRecord() (h HeapRecord, err error)

type HeapRecord

type HeapRecord struct {
	Trace []uint64 // A call trace (callee first).

	LiveObj    int64
	LiveBytes  int64
	AllocObj   int64
	AllocBytes int64
}

Jump to

Keyboard shortcuts

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