Documentation ¶
Index ¶
- func NewCustLoader(ctx context.Context, db *sql.DB, concurrency int) *custLoader
- func NewLineItemLoader(ctx context.Context, db *sql.DB, concurrency int) *lineItemloader
- func NewNationLoader(ctx context.Context, db *sql.DB, concurrency int) *nationLoader
- func NewOrderLoader(ctx context.Context, db *sql.DB, concurrency int) *orderLoader
- func NewPartLoader(ctx context.Context, db *sql.DB, concurrency int) *partLoader
- func NewPartSuppLoader(ctx context.Context, db *sql.DB, concurrency int) *partSuppLoader
- func NewRegionLoader(ctx context.Context, db *sql.DB, concurrency int) *regionLoader
- func NewSuppLoader(ctx context.Context, db *sql.DB, concurrency int) *suppLoader
- 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) Exec(sql string) error
- func (w *Workloader) FinishPlanReplayerDump() error
- func (w *Workloader) InitThread(ctx context.Context, threadID int) context.Context
- func (w *Workloader) IsPlanReplayerDumpEnabled() bool
- func (w *Workloader) Name() string
- func (w *Workloader) OutputStats(ifSummaryReport bool)
- func (w *Workloader) Prepare(ctx context.Context, threadID int) error
- func (w *Workloader) PreparePlanReplayerDump() error
- func (w *Workloader) Run(ctx context.Context, threadID int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCustLoader ¶ added in v1.0.4
func NewLineItemLoader ¶ added in v1.0.4
func NewNationLoader ¶ added in v1.0.4
func NewOrderLoader ¶ added in v1.0.4
func NewPartLoader ¶ added in v1.0.4
func NewPartSuppLoader ¶ added in v1.0.4
func NewRegionLoader ¶ added in v1.0.4
func NewSuppLoader ¶ added in v1.0.4
func NewWorkloader ¶
func NewWorkloader(db *sql.DB, cfg *Config) workload.Workloader
NewWorkloader new work loader
Types ¶
type Config ¶
type Config struct { Driver string DBName string RawQueries string QueryNames []string ScaleFactor int EnableOutputCheck bool TiFlashReplica int AnalyzeTable analyzeConfig ExecExplainAnalyze bool PrepareThreads int PlanReplayerConfig replayer.PlanReplayerConfig EnablePlanReplayer bool EnableQueryTuning bool // for prepare command only OutputType string OutputDir string // output style OutputStyle string }
Config is the configuration for tpch workload
type Workloader ¶
type Workloader struct { PlanReplayerRunner *replayer.PlanReplayerRunner // contains filtered or unexported fields }
Workloader is TPCH 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) DBName ¶
func (w *Workloader) DBName() string
DBName returns the name of test db.
func (*Workloader) Exec ¶ added in v1.0.10
func (w *Workloader) Exec(sql string) error
func (*Workloader) FinishPlanReplayerDump ¶ added in v1.0.9
func (w *Workloader) FinishPlanReplayerDump() error
func (*Workloader) InitThread ¶
InitThread inits thread
func (*Workloader) IsPlanReplayerDumpEnabled ¶ added in v1.0.9
func (w *Workloader) IsPlanReplayerDumpEnabled() bool
func (*Workloader) OutputStats ¶ added in v1.0.4
func (w *Workloader) OutputStats(ifSummaryReport bool)
func (*Workloader) Prepare ¶
func (w *Workloader) Prepare(ctx context.Context, threadID int) error
Prepare prepares data
func (*Workloader) PreparePlanReplayerDump ¶ added in v1.0.9
func (w *Workloader) PreparePlanReplayerDump() error
Click to show internal directories.
Click to hide internal directories.