bench

package
v0.8.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: AGPL-3.0 Imports: 27 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 NewSysBenchCmd

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

func NewTpccCmd

func NewTpccCmd(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

	*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 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 TpchOptions

type TpchOptions struct {
	BenchBaseOptions
}

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