tools: golang.org/x/tools/benchmark/parse Index | Files

package parse

import "golang.org/x/tools/benchmark/parse"

Package parse provides support for parsing benchmark results as generated by 'go test -bench'.

Index

Package Files

parse.go

Constants

const (
    NsPerOp = 1 << iota
    MBPerS
    AllocedBytesPerOp
    AllocsPerOp
)

Flags used by Benchmark.Measured to indicate which measurements a Benchmark contains.

type Benchmark Uses

type Benchmark struct {
    Name              string  // benchmark name
    N                 int     // number of iterations
    NsPerOp           float64 // nanoseconds per iteration
    AllocedBytesPerOp uint64  // bytes allocated per iteration
    AllocsPerOp       uint64  // allocs per iteration
    MBPerS            float64 // MB processed per second
    Measured          int     // which measurements were recorded
    Ord               int     // ordinal position within a benchmark run
}

Benchmark is one run of a single benchmark.

func ParseLine Uses

func ParseLine(line string) (*Benchmark, error)

ParseLine extracts a Benchmark from a single line of testing.B output.

func (*Benchmark) String Uses

func (b *Benchmark) String() string

type Set Uses

type Set map[string][]*Benchmark

Set is a collection of benchmarks from one testing.B run, keyed by name to facilitate comparison.

func ParseSet Uses

func ParseSet(r io.Reader) (Set, error)

ParseSet extracts a Set from testing.B output. ParseSet preserves the order of benchmarks that have identical names.

Package parse imports 6 packages (graph) and is imported by 12 packages. Updated 2017-07-19. Refresh now. Tools for package owners.