benchmark

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Benchmark

type Benchmark struct {
	// contains filtered or unexported fields
}

func New

func New(app *app.App, db *sql.DB, dir string, options ...Option) (bm *Benchmark, err error)

func (*Benchmark) Run

func (bm *Benchmark) Run(ch <-chan os.Signal) error

type Option

type Option func(*options)

func WithCluster

func WithCluster(cluster []string) Option

WithCluster sets the cluster option of the benchmark. A benchmark will only start once the whole cluster is online.

func WithClusterTimeout

func WithClusterTimeout(cTo int) Option

WithClusterTimeout sets the timeout when waiting for the whole cluster to be online

func WithDuration

func WithDuration(seconds int) Option

WithDuration sets the duration of the benchmark.

func WithKvKeySize

func WithKvKeySize(bytes int) Option

WithKvKeySize sets the size of the KV keys of the benchmark.

func WithKvValueSize

func WithKvValueSize(bytes int) Option

WithKvValueSize sets the size of the KV values of the benchmark.

func WithWorkers

func WithWorkers(n int) Option

WithWorkers sets the number of workers of the benchmark.

func WithWorkload

func WithWorkload(workload string) Option

WithWorkload sets the workload of the benchmark.

Jump to

Keyboard shortcuts

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