pessimistic

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is for pessimistic transaction test

func NewPessimisticCase

func NewPessimisticCase(cfg ClientConfig) *Client

NewPessimisticCase ...

func (*Client) Execute

func (c *Client) Execute(ctx context.Context, db *sql.DB) error

Execute implements Client Execute interface.

func (*Client) Initialize

func (c *Client) Initialize(ctx context.Context, db *sql.DB) error

Initialize ...

func (*Client) NewSession

func (c *Client) NewSession(db *sql.DB, seID, maxSize uint64) (*Session, error)

NewSession ...

func (*Client) String

func (c *Client) String() string

type ClientConfig

type ClientConfig struct {
	DBName         string `toml:"dbname"`
	Concurrency    int    `toml:"concurrency"`
	TableNum       int    `toml:"table_num"`
	TableSize      uint64 `toml:"table_size"`
	OperationCount uint64 `toml:"operation_count"`
	Mode           string `toml:"mode"`
	InsertDelete   bool   `toml:"insert_delete"`
	IgnoreCodesO   []int  `toml:"ignore_codes_o"`
	IgnoreCodesP   []int  `toml:"ignore_codes_p"`
	UsePrepareStmt bool   `toml:"use_prepare_stmt"`
}

ClientConfig is for pessimistic test case.

type ClientCreator

type ClientCreator struct {
	Cfg *Config
}

ClientCreator creates pessimisticClient

func (ClientCreator) Create

func (l ClientCreator) Create(node cluster.ClientNode) core.Client

Create creates case client

type Config

type Config struct {
	PessimisticClientConfig ClientConfig
	HongbaoClientConfig     hongbao.ClientConfig
}

Config is for pessimisticClient

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session ...

func (*Session) Run

func (se *Session) Run(wg *sync.WaitGroup)

Run ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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