Documentation ¶
Overview ¶
Package api implements the common interface exposed by all benchmarks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Benchmarks ¶
Benchmarks returns a map of all registered benchmarks.
func RegisterBenchmark ¶
func RegisterBenchmark(bench Benchmark)
RegisterBenchmark registers a new benchmark.
Types ¶
type BulkCleanupable ¶
BulkCleanupable is the interface exposed by benchmarks that require a bulk cleanup step.
If a benchmark is also a Cleanupable, the BulkCleanup operation will be invoked before any Prepare operations are dispatched.
type BulkPreparable ¶
BulkPreparable is the interface exposed by benchmarks that require a bulk pre-flight prepare step.
If a benchmark also is a Preparable, the BulkPrepare operation will be invoked after every Prepeare operation has been completed.
type Cleanupable ¶
type Cleanupable interface {
Cleanup(*State)
}
Cleanupable is the interface exposed by benchmarks require a post-flight cleanup step.
type Config ¶
type Config struct { Logger *logging.Logger Conn *grpc.ClientConn RuntimeID common.Namespace Concurrency int Duration time.Duration Rate uint LogVerboseDebug bool }
Config is a benchmark run configuration.
type Prepareable ¶
Prepareable is the interface exposed by benchmarks requiring a pre-flight prepare step.
type State ¶
type State struct { Id uint64 Config *Config Logger *logging.Logger Client client.RuntimeClient State interface{} }
State is the per-goroutine benchmark state.
type SuiteInitFn ¶
SuiteInitFn is the initializer exposed by each benchmark suite package.