Documentation
¶
Index ¶
- func NewBenchCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewPgBenchCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewSysBenchCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- type BenchBaseOptions
- type PgBenchOptions
- type SysBenchOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBenchCmd ¶
NewBenchCmd creates the bench command
func NewPgBenchCmd ¶ added in v0.6.0
func NewSysBenchCmd ¶ added in v0.6.0
Types ¶
type BenchBaseOptions ¶ added in v0.6.0
type BenchBaseOptions struct {
Driver string `json:"driver"`
Database string `json:"database"`
Host string `json:"host"`
Port int `json:"port"`
User string `json:"user"`
Password string `json:"password"`
}
func (*BenchBaseOptions) AddFlags ¶ added in v0.6.0
func (o *BenchBaseOptions) AddFlags(cmd *cobra.Command)
func (*BenchBaseOptions) BaseValidate ¶ added in v0.6.0
func (o *BenchBaseOptions) BaseValidate() error
type PgBenchOptions ¶ added in v0.6.0
type PgBenchOptions struct {
Mode string `json:"mode"`
Cmd []string `json:"cmd"`
Args []string `json:"args"`
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
Times int // specify the duration of benchmark test in seconds
Select bool // specify to run SELECT-only transactions
BenchBaseOptions
*cluster.ClusterObjects
genericclioptions.IOStreams
// contains filtered or unexported fields
}
func (*PgBenchOptions) Complete ¶ added in v0.6.0
func (o *PgBenchOptions) Complete(args []string) error
func (*PgBenchOptions) Run ¶ added in v0.6.0
func (o *PgBenchOptions) Run() error
func (*PgBenchOptions) Validate ¶ added in v0.6.0
func (o *PgBenchOptions) Validate() error
type SysBenchOptions ¶ added in v0.6.0
type SysBenchOptions struct {
Mode string `json:"mode"`
Threads []int `json:"thread"`
Tables int `json:"tables"`
Size int `json:"size"`
Times int `json:"times"`
Type []string `json:"type"`
ReadPercent int `json:"readPercent"`
WritePercent int `json:"writePercent"`
Value string `json:"value"`
Flag int `json:"flag"`
BenchBaseOptions
*cluster.ClusterObjects `json:"-"`
genericclioptions.IOStreams `json:"-"`
// contains filtered or unexported fields
}
func (*SysBenchOptions) Complete ¶ added in v0.6.0
func (o *SysBenchOptions) Complete(args []string) error
func (*SysBenchOptions) Run ¶ added in v0.6.0
func (o *SysBenchOptions) Run() error
func (*SysBenchOptions) Validate ¶ added in v0.6.0
func (o *SysBenchOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.