bench

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBenchCmd

func NewBenchCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

NewBenchCmd creates the bench command

func NewPgBenchCmd

func NewPgBenchCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

func NewRedisBenchmarkCmd added in v0.7.3

func NewRedisBenchmarkCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

func NewSysBenchCmd

func NewSysBenchCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

func NewTpccCmd

func NewTpccCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

func NewTpcdsCmd added in v0.9.0

func NewTpcdsCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

func NewTpchCmd

func NewTpchCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

func NewYcsbCmd

func NewYcsbCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

Types

type BenchBaseOptions

type BenchBaseOptions struct {
	// define the target database
	Driver      string
	Database    string
	Host        string
	Port        int
	User        string
	Password    string
	ClusterName string

	Step           string // specify the benchmark step, exec all, cleanup, prepare or run
	TolerationsRaw []string
	Tolerations    []corev1.Toleration
	ExtraArgs      []string // extra arguments for benchmark
	RequestCPU     string
	RequestMemory  string
	LimitCPU       string
	LimitMemory    string

	*cluster.ClusterObjects
	genericiooptions.IOStreams
	// contains filtered or unexported fields
}

func (*BenchBaseOptions) AddFlags

func (o *BenchBaseOptions) AddFlags(cmd *cobra.Command)

func (*BenchBaseOptions) BaseComplete

func (o *BenchBaseOptions) BaseComplete() error

func (*BenchBaseOptions) BaseValidate

func (o *BenchBaseOptions) BaseValidate() error

BaseValidate validates the base options In some cases, for example, in redis, the database is not required, the username is not required and password can be empty for many databases, so we don't validate them here

type PgBenchOptions

type PgBenchOptions struct {
	Scale        int   // specify the scale factor for the benchmark test
	Clients      []int // specify the number of clients to run
	Threads      int   // specify the number of threads per client
	Transactions int   // specify the number of transactions per client
	Duration     int   // specify the duration of benchmark test in seconds
	Select       bool  // specify to run SELECT-only transactions

	BenchBaseOptions
}

func (*PgBenchOptions) Complete

func (o *PgBenchOptions) Complete(args []string) error

func (*PgBenchOptions) Run

func (o *PgBenchOptions) Run() error

func (*PgBenchOptions) Validate

func (o *PgBenchOptions) Validate() error

type RedisBenchOptions added in v0.7.3

type RedisBenchOptions struct {
	Clients  []int  // clients provides a list of client counts to run redis-benchmark with multiple times.
	Requests int    // total number of requests
	DataSize int    // data size of set/get value in bytes
	KeySpace int    // use random keys for SET/GET/INCR, random values for SADD
	Tests    string // only run the comma separated list of tests. The test names are the same as the ones produced as output.
	Pipeline int    // pipelining num requests. Default 1 (no pipeline).
	Quiet    bool   // quiet mode. Just show query/sec values

	BenchBaseOptions
}

func (*RedisBenchOptions) Complete added in v0.7.3

func (o *RedisBenchOptions) Complete(args []string) error

func (*RedisBenchOptions) Run added in v0.7.3

func (o *RedisBenchOptions) Run() error

func (*RedisBenchOptions) Validate added in v0.7.3

func (o *RedisBenchOptions) Validate() error

type SysBenchOptions

type SysBenchOptions struct {
	Threads      []int // the number of threads
	Tables       int   // the number of tables
	Size         int   // the data size of per table
	Duration     int
	Type         []string
	ReadPercent  int
	WritePercent int

	BenchBaseOptions
}

func (*SysBenchOptions) Complete

func (o *SysBenchOptions) Complete(args []string) error

func (*SysBenchOptions) Run

func (o *SysBenchOptions) Run() error

func (*SysBenchOptions) Validate

func (o *SysBenchOptions) Validate() error

type TpccOptions

type TpccOptions struct {
	WareHouses    int   // specify the overall database size scaling parameter
	Threads       []int // specify the number of threads to use
	Transactions  int   // specify the number of transactions that each thread should run
	Duration      int   // specify the number of minutes to run
	LimitTxPerMin int   // limit the number of transactions to run per minute, 0 means no limit
	NewOrder      int   // specify the percentage of transactions that should be new orders
	Payment       int   // specify the percentage of transactions that should be payments
	OrderStatus   int   // specify the percentage of transactions that should be order status
	Delivery      int   // specify the percentage of transactions that should be delivery
	StockLevel    int   // specify the percentage of transactions that should be stock level

	BenchBaseOptions
}

func (*TpccOptions) Complete

func (o *TpccOptions) Complete(args []string) error

func (*TpccOptions) Run

func (o *TpccOptions) Run() error

func (*TpccOptions) Validate

func (o *TpccOptions) Validate() error

type TpcdsOptions added in v0.9.0

type TpcdsOptions struct {
	BenchBaseOptions

	Size   int
	UseKey bool
}

func (*TpcdsOptions) Complete added in v0.9.0

func (o *TpcdsOptions) Complete(args []string) error

func (*TpcdsOptions) Run added in v0.9.0

func (o *TpcdsOptions) Run() error

func (*TpcdsOptions) Validate added in v0.9.0

func (o *TpcdsOptions) Validate() error

type TpchOptions

type TpchOptions struct {
	BenchBaseOptions
	Size int
}

func (*TpchOptions) Complete

func (o *TpchOptions) Complete(args []string) error

func (*TpchOptions) Run

func (o *TpchOptions) Run() error

func (*TpchOptions) Validate

func (o *TpchOptions) Validate() error

type YcsbOptions

type YcsbOptions struct {
	Threads                   []int // the number of threads to use
	RecordCount               int   // the number of records to use
	OperationCount            int   // the number of operations to use during the run phase
	ReadProportion            int   // the proportion of operations that are reads
	UpdateProportion          int   // the proportion of operations that are updates
	InsertProportion          int   // the proportion of operations that are inserts
	ScanProportion            int   // the proportion of operations that are scans
	ReadModifyWriteProportion int   // the proportion of operations that are read then modify a record

	BenchBaseOptions
}

func (*YcsbOptions) Complete

func (o *YcsbOptions) Complete(args []string) error

func (*YcsbOptions) Run

func (o *YcsbOptions) Run() error

func (*YcsbOptions) Validate

func (o *YcsbOptions) Validate() error

Jump to

Keyboard shortcuts

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