benchmark

package module
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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgError messageKind = iota
	MsgInfo
	MsgDebug
	MsgOpt
)
View Source
const PprofBufferReserve = 1024 * 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type Benchmark

type Benchmark struct {
	*T
	Pprof *list.List
}

func Run

func Run(label string, f func(*T) error) *Benchmark

func RunWithProcessor

func RunWithProcessor(label string, processor func(*T, *T) *T, f func(*T) error) *Benchmark

func (*Benchmark) MarshalJSON

func (b *Benchmark) MarshalJSON() ([]byte, error)

func (*Benchmark) ReadJson

func (b *Benchmark) ReadJson(rd io.Reader) error

func (*Benchmark) UnmarshalJSON

func (b *Benchmark) UnmarshalJSON(bs []byte) error

func (*Benchmark) WriteJson

func (b *Benchmark) WriteJson(wr io.Writer) (int, error)

func (*Benchmark) WriteJsonResult

func (b *Benchmark) WriteJsonResult() (int, error)

type Message

type Message struct {
	Kind messageKind
	Text string
}

type T

type T struct {
	Err   error
	Label string
	Count int

	Active, Total time.Duration

	Children, Messages *list.List
	Heap               *ppf.Report
	// contains filtered or unexported fields
}

func New

func New(label string) *T

func (*T) Debug

func (t *T) Debug(a ...interface{})

func (*T) Debugf

func (t *T) Debugf(ft string, a ...interface{})

func (*T) Error

func (t *T) Error(a ...interface{})

func (*T) Errorf

func (t *T) Errorf(ft string, a ...interface{})

func (*T) Info

func (t *T) Info(a ...interface{})

func (*T) Infof

func (t *T) Infof(ft string, a ...interface{})

func (*T) MarshalJSON

func (t *T) MarshalJSON() ([]byte, error)

func (*T) Opt

func (t *T) Opt(a string)

func (*T) Run

func (t *T) Run(label string, f func(*T) error) (err error)

func (*T) Start

func (t *T) Start()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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