bench

package
v0.0.0-...-5dfffbf Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Functions

func Functions(rootPath string) (data.PackageMap, error)

func MatchingFunctions

func MatchingFunctions(rootPath, benchRegex string) (data.PackageMap, error)

func TimedRun

func TimedRun(ctx context.Context, r Runner, run int, test string) (int, error, time.Duration)

Types

type BenchVisitor

type BenchVisitor struct {
	// contains filtered or unexported fields
}

func (*BenchVisitor) Visit

func (v *BenchVisitor) Visit(node ast.Node) ast.Visitor

func (*BenchVisitor) VisitFuncDecl

func (v *BenchVisitor) VisitFuncDecl(f *ast.FuncDecl)

type Runner

type Runner interface {
	Run(ctx context.Context, run int, test string) (int, error)
}

func NewRunner

func NewRunner(goRoot, projectRoot string, benchs data.PackageMap, wi int, mi int, timeout, benchTime, benchDuration, runDuration time.Duration, benchMem bool, profile data.Profile, profileDir string, out csv.Writer) (Runner, error)

NewRunner creates a new benchmark runner. By default it returns a penalised runner that in consecutive runs only executes successful benchmark executions.

Jump to

Keyboard shortcuts

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