ppftool

package
v0.0.0-...-43cecaf Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultUnit = Second

Functions

func FakeUi

func FakeUi() driver.UI

func Fetcher

func Fetcher(b []byte) driver.Fetcher

func Flagset

func Flagset(a ...string) driver.FlagSet

func Image

func Image(b []byte, o *Options, u driver.UI) ([]byte, error)

func TempFileName

func TempFileName() string

Types

type Graph

type Graph byte
const (
	NoImage Graph = iota
	PNG
	SVG
	DOT
)

type Index

type Index byte
const (
	CpuProfIndex Index = iota
	AllocObjectsIndex
	AllocSpaceIndex
	InuseObjectsIndex
	InuseSpaceIndex
)

type Options

type Options struct {
	Unit // Second, Millisecond, Microsecond
	Index

	Count     int      // -nodecount=
	CumSort   bool     // -cum=
	TagShow   []string // -tagshow=
	TagHide   []string // -taghide=
	TagIgnore []string // -tagignore=
	TagFocus  []string // -tagfocus=
	Ignore    []string // -ignore=
	Focus     []string // -focus=
	Show      []string // -show=
	Hide      []string // -hide=

	Graph         // type of callgrapth image NoImage, PNG, SVG, DOT
	Gcount   int  // -nodecount for callgraph, if <=0 is used Count
	NoLegend bool // remove legend from callgraph image
}

type Report

type Report struct {
	Unit
	Rows
	Errors []string
	Label  string
	Image  string
}

func Top

func Top(b []byte, o *Options) (*Report, error)

func (*Report) FromMap

func (p0 *Report) FromMap(m map[string]interface{}) error

func (*Report) MarshalJSON

func (p *Report) MarshalJSON() ([]byte, error)

func (*Report) ToMap

func (p *Report) ToMap() map[string]interface{}

func (*Report) UnmarshalJSON

func (p *Report) UnmarshalJSON(bs []byte) error

func (*Report) Write

func (r *Report) Write(b []byte) (int, error)

type Row

type Row struct {
	Function string

	Flat, FlatPercent, SumPercent, Cum, CumPercent float64
}

type Rows

type Rows []*Row

type Unit

type Unit byte
const (
	Second      Unit = 0
	Millisecond Unit = 1
	Microsecond Unit = 2
	Megabyte    Unit = 3
	Kilobyte    Unit = 4
	Byte        Unit = 5
	None        Unit = 6
)

func (*Unit) FromString

func (u *Unit) FromString(s string) error

func (Unit) String

func (u Unit) String() string

Jump to

Keyboard shortcuts

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