Documentation ¶
Overview ¶
Package benchmark runs benchmark tests of Finch.
Package benchmark runs benchmark tests of Finch.
Index ¶
- Constants
- Variables
- func GetSubject() (string, error)
- func Wrapper(b *testing.B, targetFunc func(), cleanupFunc func())
- type Metrics
- type Suite
- func (suite *Suite) BenchmarkContainerRun(b *testing.B)
- func (suite *Suite) BenchmarkImageBuild(b *testing.B)
- func (suite *Suite) BenchmarkVMInit(b *testing.B)
- func (suite *Suite) BenchmarkVMStart(b *testing.B)
- func (suite *Suite) InitVM() error
- func (suite *Suite) RemoveVM() error
- func (suite *Suite) Setup() error
- func (suite *Suite) StartVM() error
- func (suite *Suite) StopVM() error
Constants ¶
const InstalledTestSubject = "finch"
InstalledTestSubject is the test subject when Finch is installed.
Variables ¶
var Installed = flag.Bool("installed", false, "the flag to show whether the tests are run against installed application")
Installed indicates whether the tests are run against installed application.
Functions ¶
func GetSubject ¶
GetSubject returns the testing subject based on INSTALLED flag.
Types ¶
type Metrics ¶ added in v0.6.1
type Metrics struct { PeakCPUUsage float64 AverageCPUUsage float64 TotalCPUTime time.Duration DiskUsageDelta int64 }
Metrics includes all the additional metrics that Finch benchmark reports, except testing.B natively supported metrics like execution time and memory.
type Suite ¶ added in v0.6.1
type Suite struct {
// contains filtered or unexported fields
}
Suite is a struct that groups benchmark functions and shared state.
func (*Suite) BenchmarkContainerRun ¶ added in v0.6.1
BenchmarkContainerRun measures the metrics to run a container.
func (*Suite) BenchmarkImageBuild ¶ added in v0.6.1
BenchmarkImageBuild measures the metrics to build an image.
func (*Suite) BenchmarkVMInit ¶ added in v0.6.1
BenchmarkVMInit measures the metrics to initialize the VM.
func (*Suite) BenchmarkVMStart ¶ added in v0.6.1
BenchmarkVMStart measures the metrics to start the VM.