bench

package
v0.6.0-beta.14 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBenchCmd

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

NewBenchCmd creates the bench command

func NewPgBenchCmd added in v0.6.0

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

func NewSysBenchCmd added in v0.6.0

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

Types

type BenchBaseOptions added in v0.6.0

type BenchBaseOptions struct {
	Driver      string
	Database    string
	Host        string
	Port        int
	User        string
	Password    string
	ClusterName string
}

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 {
	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
	ExtraArgs    []string // specify extra arguments for pgbench

	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 {
	Threads      []int // the number of threads
	Tables       int   // the number of tables
	Size         int   // the data size of per table
	Duration     int
	Type         []string
	ExtraArgs    []string
	ReadPercent  int
	WritePercent int

	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

Jump to

Keyboard shortcuts

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