ben

package
v0.0.0-...-ff5f600 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2016 License: BSD-3-Clause Imports: 7 Imported by: 0

README

Ben: μBenchmark archival

TODOs

  • Do not assume that the code is under a jiri project (i.e., detect ben.SourceCode based on the git repository state?)
  • Page to list out all benchmark results (across all scenarios) for a particular (BenchmarkName, SourceCode) pair (e.g., results for foo/bar.BenchmarkBaz across linux, darwin, arm, amd64 for a particular snapshot of the code)
  • Render times in local timezone (and convert timezones in the query to the server)
  • Ability to query results by time range

Documentation

Overview

Package ben defines datastructures to archive microbenchmark results.

These are the data structures common to tools described in https://docs.google.com/document/d/1v-iKwej3eYT_RNhPwQ81A9fa8H15Q6RzNyv2rrAeAUc/edit?usp=sharing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cpu

type Cpu struct {
	Architecture  string // Architecture of the CPU, e.g. "amd64", "386" etc.
	Description   string // A detailed description of the CPU, e.g., "Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz"
	ClockSpeedMhz uint32 // Clock speed of the CPU in MHz
}

Cpu describes the CPU of the machine on which the microbenchmarks were run.

func (*Cpu) FillVDLTarget

func (m *Cpu) FillVDLTarget(t vdl.Target, tt *vdl.Type) error

func (*Cpu) MakeVDLTarget

func (m *Cpu) MakeVDLTarget() vdl.Target

func (Cpu) VDLIsZero

func (x Cpu) VDLIsZero() bool

func (*Cpu) VDLRead

func (x *Cpu) VDLRead(dec vdl.Decoder) error

func (Cpu) VDLWrite

func (x Cpu) VDLWrite(enc vdl.Encoder) error

type CpuTarget

type CpuTarget struct {
	Value *Cpu

	vdl.TargetBase
	vdl.FieldsTargetBase
	// contains filtered or unexported fields
}

func (*CpuTarget) FinishField

func (t *CpuTarget) FinishField(_, _ vdl.Target) error

func (*CpuTarget) FinishFields

func (t *CpuTarget) FinishFields(_ vdl.FieldsTarget) error

func (*CpuTarget) StartField

func (t *CpuTarget) StartField(name string) (key, field vdl.Target, _ error)

func (*CpuTarget) StartFields

func (t *CpuTarget) StartFields(tt *vdl.Type) (vdl.FieldsTarget, error)

func (*CpuTarget) ZeroField

func (t *CpuTarget) ZeroField(name string) error

type Os

type Os struct {
	Name    string // Short name of the operating system: linux, darwin, android etc.
	Version string // Details of the distribution/version, e.g., "Ubuntu 14.04", "Mac OS X 10.11.2 15C50" etc.
}

Os describes the Operating System on which the microbenchmarks were run.

func (*Os) FillVDLTarget

func (m *Os) FillVDLTarget(t vdl.Target, tt *vdl.Type) error

func (*Os) MakeVDLTarget

func (m *Os) MakeVDLTarget() vdl.Target

func (Os) VDLIsZero

func (x Os) VDLIsZero() bool

func (*Os) VDLRead

func (x *Os) VDLRead(dec vdl.Decoder) error

func (Os) VDLWrite

func (x Os) VDLWrite(enc vdl.Encoder) error

type OsTarget

type OsTarget struct {
	Value *Os

	vdl.TargetBase
	vdl.FieldsTargetBase
	// contains filtered or unexported fields
}

func (*OsTarget) FinishField

func (t *OsTarget) FinishField(_, _ vdl.Target) error

func (*OsTarget) FinishFields

func (t *OsTarget) FinishFields(_ vdl.FieldsTarget) error

func (*OsTarget) StartField

func (t *OsTarget) StartField(name string) (key, field vdl.Target, _ error)

func (*OsTarget) StartFields

func (t *OsTarget) StartFields(tt *vdl.Type) (vdl.FieldsTarget, error)

func (*OsTarget) ZeroField

func (t *OsTarget) ZeroField(name string) error

type Run

type Run struct {
	Name              string // Name of the microbenchmark. <package>.Benchmark<Name> in Go.
	Iterations        uint64
	NanoSecsPerOp     float64 // Nano-seconds per iteration.
	AllocsPerOp       uint64  // Memory allocations per iteration.
	AllocedBytesPerOp uint64  // Size of memory allocations per iteration.
	MegaBytesPerSec   float64 // Throughput in MB/s.
	Parallelism       uint32  // For Go, the GOMAXPROCS used during benchmark execution
}

Run encapsulates the results of a single microbenchmark run.

func (*Run) FillVDLTarget

func (m *Run) FillVDLTarget(t vdl.Target, tt *vdl.Type) error

func (*Run) MakeVDLTarget

func (m *Run) MakeVDLTarget() vdl.Target

func (Run) PrettyTime

func (r Run) PrettyTime() string

PrettyTime returns a string representing r.NanoSecsPerOp in a more human-friendly form, similar to time.Duration.String.

func (Run) VDLIsZero

func (x Run) VDLIsZero() bool

func (*Run) VDLRead

func (x *Run) VDLRead(dec vdl.Decoder) error

func (Run) VDLWrite

func (x Run) VDLWrite(enc vdl.Encoder) error

type RunTarget

type RunTarget struct {
	Value *Run

	vdl.TargetBase
	vdl.FieldsTargetBase
	// contains filtered or unexported fields
}

func (*RunTarget) FinishField

func (t *RunTarget) FinishField(_, _ vdl.Target) error

func (*RunTarget) FinishFields

func (t *RunTarget) FinishFields(_ vdl.FieldsTarget) error

func (*RunTarget) StartField

func (t *RunTarget) StartField(name string) (key, field vdl.Target, _ error)

func (*RunTarget) StartFields

func (t *RunTarget) StartFields(tt *vdl.Type) (vdl.FieldsTarget, error)

func (*RunTarget) ZeroField

func (t *RunTarget) ZeroField(name string) error

type Scenario

type Scenario struct {
	Cpu   Cpu
	Os    Os
	Label string // Arbitrary string label assigned by the uploader.
}

Scenario encapsulates the conditions on the machine on which the microbenchmarks were run.

func (*Scenario) FillVDLTarget

func (m *Scenario) FillVDLTarget(t vdl.Target, tt *vdl.Type) error

func (*Scenario) MakeVDLTarget

func (m *Scenario) MakeVDLTarget() vdl.Target

func (Scenario) VDLIsZero

func (x Scenario) VDLIsZero() bool

func (*Scenario) VDLRead

func (x *Scenario) VDLRead(dec vdl.Decoder) error

func (Scenario) VDLWrite

func (x Scenario) VDLWrite(enc vdl.Encoder) error

type ScenarioTarget

type ScenarioTarget struct {
	Value *Scenario

	vdl.TargetBase
	vdl.FieldsTargetBase
	// contains filtered or unexported fields
}

func (*ScenarioTarget) FinishField

func (t *ScenarioTarget) FinishField(_, _ vdl.Target) error

func (*ScenarioTarget) FinishFields

func (t *ScenarioTarget) FinishFields(_ vdl.FieldsTarget) error

func (*ScenarioTarget) StartField

func (t *ScenarioTarget) StartField(name string) (key, field vdl.Target, _ error)

func (*ScenarioTarget) StartFields

func (t *ScenarioTarget) StartFields(tt *vdl.Type) (vdl.FieldsTarget, error)

func (*ScenarioTarget) ZeroField

func (t *ScenarioTarget) ZeroField(name string) error

type SourceCode

type SourceCode string

SourceCode represents the state of the source code used to build the microbenchmarks.

Typically it would be the commit hash of a git repository or the contents of a manifest of a jiri (https://github.com/vanadium/go.jiri) project and not the complete source code itself.

func (*SourceCode) FillVDLTarget

func (m *SourceCode) FillVDLTarget(t vdl.Target, tt *vdl.Type) error

func (SourceCode) ID

func (c SourceCode) ID() string

ID returns a short identifier for Code.

func (*SourceCode) MakeVDLTarget

func (m *SourceCode) MakeVDLTarget() vdl.Target

func (SourceCode) VDLIsZero

func (x SourceCode) VDLIsZero() bool

func (*SourceCode) VDLRead

func (x *SourceCode) VDLRead(dec vdl.Decoder) error

func (SourceCode) VDLWrite

func (x SourceCode) VDLWrite(enc vdl.Encoder) error

type SourceCodeTarget

type SourceCodeTarget struct {
	Value *SourceCode
	vdl.TargetBase
}

func (*SourceCodeTarget) FromString

func (t *SourceCodeTarget) FromString(src string, tt *vdl.Type) error

Directories

Path Synopsis
Package archive defines the RPC interface for archiving benchmark results.
Package archive defines the RPC interface for archiving benchmark results.
Command benarchd implements a benchmark archival daemon.
Command benarchd implements a benchmark archival daemon.
Command benup extracts microbenchmark results from the provided input (standard input for file) and uploads them to an archival service.
Command benup extracts microbenchmark results from the provided input (standard input for file) and uploads them to an archival service.

Jump to

Keyboard shortcuts

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