gobenchtools

package module
v0.0.0-...-aa17fc5 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: MIT Imports: 8 Imported by: 0

README

gobenchtools

Is an assortment of tools to process go benchmark results. This tools have very unique and simple uses.

Documentation

Index

Constants

View Source
const DefaultFileMode = 0660

Variables

View Source
var BenchMarkResultExp = regexp.MustCompile(`^(?P<benchName>[0-9A-Za-z_\-/.]+)\s+(?P<n>\d+)\s+(?P<nsPerOp>\d+(?:\.\d+)?) ns/op`)
View Source
var PkgNameExp = regexp.MustCompile(`^pkg: (?P<pkgName>[0-9A-Za-z_\-/.]+)`)

Functions

This section is empty.

Types

type Benchmark

type Benchmark struct {
	ID      int     `json:"id,omitempty"`
	Commit  string  `json:"commit,omitempty"`
	Name    string  `json:"name,omitempty"`
	N       uint64  `json:"n"`
	NSPerOp float64 `json:"ns_per_op"`
}

type HistoricPkgBench

type HistoricPkgBench map[string]map[string][]Benchmark

HistoryPkgBench map package to a map of benchmark name to benchmark results

type ParsedBench

type ParsedBench map[string][]Benchmark

ParsedBench is a map of package name to a Slice containing all the benchmarks for that slice.

func ParseFile

func ParseFile(fileIn string) (ParsedBench, error)

type TestCase

type TestCase struct {
	Name      string `xml:"name,attr"`
	Time      string `xml:"time,attr"`
	Package   string `xml:"package,attr"`
	ClassName string `xml:"classname,attr"`
	Cycles    uint64 `xml:"cycles,attr"`
}

type TestSuite

type TestSuite struct {
	Name  string     `xml:"name,attr"`
	Tests []TestCase `xml:"testcase"`
}

type TestSuites

type TestSuites struct {
	XMLName   xml.Name  `xml:"testsuites"`
	TestSuite TestSuite `xml:"testsuite"`
}

func ParseToXML

func ParseToXML(fileIn, suiteName, stripFromPacakgeName string) (*TestSuites, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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