workload

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// run simple txn to test tidb
	WorkloadTypeTXN = "TXN"
	// run select(*) to test tikv and tiflash
	WorkloadTypeSelectCount = "SelectCount"
)

Variables

This section is empty.

Functions

func ConfigJobWithTLS

func ConfigJobWithTLS(job *batchv1.Job, o *Options) *batchv1.Job

Types

type Option

type Option interface {
	With(opts *Options)
}

func MaxExecutionTime

func MaxExecutionTime(ms int) Option

func MaxLifeTime

func MaxLifeTime(sec int) Option

func Port

func Port(port int) Option

func RegionCount

func RegionCount(count int) Option

func TLS

func TLS(ca, certKeyPair string) Option

func TiFlashReplicas

func TiFlashReplicas(replicas int) Option

func User

func User(user, password string) Option

func WorkloadType

func WorkloadType(t string) Option

type Options

type Options struct {
	Port        int
	User        string
	Password    string
	TLS         bool
	CA          string
	CertKeyPair string

	RegionCount int

	// MaxExecutionTime is max_execution_time of tidb in millisecond
	// Default is 2000
	MaxExecutionTime int

	TiFlashReplicas int

	// MaxLifeTime is max life time in seconds of sql connections
	// Default is 60
	MaxLifeTime int

	// WorkloadType defines type of the workload
	// Only support TXN and SelectCount now
	WorkloadType string
}

func DefaultOptions

func DefaultOptions() *Options

type WithOption

type WithOption func(opts *Options)

func (WithOption) With

func (opt WithOption) With(opts *Options)

Jump to

Keyboard shortcuts

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