Documentation
¶
Index ¶
- func NewWorkloader(db *sql.DB, cfg *Config) workload.Workloader
- type Config
- type Workloader
- func (w Workloader) Check(ctx context.Context, threadID int) error
- func (w Workloader) CheckPrepare(ctx context.Context, threadID int) error
- func (w Workloader) Cleanup(ctx context.Context, threadID int) error
- func (w Workloader) CleanupThread(ctx context.Context, threadID int)
- func (w Workloader) DBName() string
- func (w Workloader) InitThread(ctx context.Context, threadID int) context.Context
- func (w Workloader) Name() string
- func (w Workloader) OutputStats(ifSummaryReport bool)
- func (w Workloader) Prepare(ctx context.Context, threadID int) error
- func (w Workloader) Run(ctx context.Context, threadID int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWorkloader ¶
func NewWorkloader(db *sql.DB, cfg *Config) workload.Workloader
NewWorkloader new work loader
Types ¶
type Config ¶
type Config struct {
DBName string
RawQueries string
QueryNames []string
CreateTiFlashReplica bool
AnalyzeTable analyzeConfig
RefreshConnWait time.Duration
}
Config is the configuration for ch workload
type Workloader ¶
type Workloader struct {
// contains filtered or unexported fields
}
Workloader is CH workload
func (Workloader) Check ¶
func (w Workloader) Check(ctx context.Context, threadID int) error
Check checks data
func (Workloader) CheckPrepare ¶
func (w Workloader) CheckPrepare(ctx context.Context, threadID int) error
CheckPrepare checks prepare
func (Workloader) Cleanup ¶
func (w Workloader) Cleanup(ctx context.Context, threadID int) error
Cleanup cleans up workloader
func (Workloader) CleanupThread ¶
func (w Workloader) CleanupThread(ctx context.Context, threadID int)
CleanupThread cleans up thread
func (Workloader) InitThread ¶
InitThread inits thread
func (Workloader) OutputStats ¶
func (w Workloader) OutputStats(ifSummaryReport bool)
Click to show internal directories.
Click to hide internal directories.