report

package
v0.0.0-...-35b9734 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2014 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NODE_FRACTION = .005
	EDGE_FRACTION = .001
)
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 Edge

type Edge struct {
	Node1, Node2 int
	Count        int64
}

type Graph

type Graph map[string]Node

func (Graph) Edges

func (g Graph) Edges() (e []Edge)

func (Graph) Nodes

func (g Graph) Nodes() (ns []Node)

type GraphDrawer

type GraphDrawer struct {
	NodeFraction float64
	EdgeFraction float64
}

type GraphReport

type GraphReport struct {
	Prog  string
	Total int64
	Unit  string
	Graph Graph

	NodeFrac float64
	EdgeFrac float64
}

func (*GraphReport) Edges

func (g *GraphReport) Edges() (e []Edge)

func (*GraphReport) Nodes

func (g *GraphReport) Nodes() (ns []Node)

func (*GraphReport) WriteTo

func (g *GraphReport) WriteTo(w io.Writer) error

type Node

type Node struct {
	Id      int
	Sym     string
	Self    int64
	Cumul   int64
	Callees map[string]int64
}

func (*Node) Leaf

func (n *Node) Leaf() bool

type RemoteResolver

type RemoteResolver struct {
	Url     string
	Symbols map[uint64]string
}

func (*RemoteResolver) Prepare

func (nr *RemoteResolver) Prepare(addrs []uint64) error

func (*RemoteResolver) Resolve

func (nr *RemoteResolver) Resolve(addr uint64) string

type ReportLine

type ReportLine struct {
	Name        string
	Self, Cumul [4]float64
}

type Reporter

type Reporter struct {
	Resolver Resolver
	// contains filtered or unexported fields
}

A Reporter is used to produce reports from profile data.

func (*Reporter) Add

func (r *Reporter) Add(trace []uint64, count ...int64)

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

func (*Reporter) GraphByFunc

func (r *Reporter) GraphByFunc(col int) Graph

func (*Reporter) ReportByFunc

func (r *Reporter) ReportByFunc(column int) []ReportLine

func (*Reporter) ReportByPC

func (r *Reporter) ReportByPC() []ReportLine

func (*Reporter) SetExecutable

func (r *Reporter) SetExecutable(filename string) error

func (*Reporter) Symbols

func (r *Reporter) Symbols() (as []uint64)

func (*Reporter) Total

func (r *Reporter) Total(col int) (t int64)

type Resolver

type Resolver interface {
	Resolve(uint64) string
}

A Resolver associates a symbol to a numeric address.

type Stats

type Stats 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