ben

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 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) VDLIsZero

func (x Cpu) VDLIsZero() bool

func (*Cpu) VDLRead

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

func (Cpu) VDLReflect

func (Cpu) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/services/ben.Cpu"`
})

func (Cpu) VDLWrite

func (x Cpu) VDLWrite(enc vdl.Encoder) 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) VDLIsZero

func (x Os) VDLIsZero() bool

func (*Os) VDLRead

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

func (Os) VDLReflect

func (Os) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/services/ben.Os"`
})

func (Os) VDLWrite

func (x Os) VDLWrite(enc vdl.Encoder) 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) 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) VDLReflect

func (Run) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/services/ben.Run"`
})

func (Run) VDLWrite

func (x Run) VDLWrite(enc vdl.Encoder) 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) VDLIsZero

func (x Scenario) VDLIsZero() bool

func (*Scenario) VDLRead

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

func (Scenario) VDLReflect

func (Scenario) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/services/ben.Scenario"`
})

func (Scenario) VDLWrite

func (x Scenario) VDLWrite(enc vdl.Encoder) 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) ID

func (c SourceCode) ID() string

ID returns a short identifier for Code.

func (SourceCode) VDLIsZero

func (x SourceCode) VDLIsZero() bool

func (*SourceCode) VDLRead

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

func (SourceCode) VDLReflect

func (SourceCode) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/services/ben.SourceCode"`
})

func (SourceCode) VDLWrite

func (x SourceCode) VDLWrite(enc vdl.Encoder) 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.

Jump to

Keyboard shortcuts

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