workload

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatasetState

type DatasetState struct {
	DB   *sql.DB
	Conn *sql.Conn
}

DatasetState saves state for each thread

func NewDatasetState

func NewDatasetState(ctx context.Context, db *sql.DB) *DatasetState

NewDatasetState creates a base DatasetState

func (*DatasetState) RefreshConn

func (t *DatasetState) RefreshConn(ctx context.Context) error

type Workloader

type Workloader interface {
	Name() string
	DBName() string
	InitThread(ctx context.Context) context.Context
	CleanupThread(ctx context.Context)
	Prepare(ctx context.Context) error
	Run(ctx context.Context) error
	Cleanup(ctx context.Context) error
}

Workloader is the interface for running customized workload.

Jump to

Keyboard shortcuts

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