client

package
v0.0.0-...-5b768f9 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 10 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 a struct which is used the run workload to a specific DB.

func NewClient

func NewClient(p *properties.Properties, workload ycsb.Workload, db ycsb.DB) *Client

NewClient returns a client with the given workload and DB. The workload and db can't be nil.

func (*Client) Run

func (c *Client) Run(ctx context.Context)

Run runs the workload to the target DB, and blocks until all workers end.

type DbWrapper

type DbWrapper struct {
	DB ycsb.DB
}

DbWrapper stores the pointer to a implementation of ycsb.DB.

func (DbWrapper) Analyze

func (db DbWrapper) Analyze(ctx context.Context, table string) error

func (DbWrapper) BatchDelete

func (db DbWrapper) BatchDelete(ctx context.Context, table string, keys []string) (err error)

func (DbWrapper) BatchInsert

func (db DbWrapper) BatchInsert(ctx context.Context, table string, keys []string, values []map[string][]byte) (err error)

func (DbWrapper) BatchRead

func (db DbWrapper) BatchRead(ctx context.Context, table string, keys []string, fields []string) (_ []map[string][]byte, err error)

func (DbWrapper) BatchUpdate

func (db DbWrapper) BatchUpdate(ctx context.Context, table string, keys []string, values []map[string][]byte) (err error)

func (DbWrapper) CleanupThread

func (db DbWrapper) CleanupThread(ctx context.Context)

func (DbWrapper) Close

func (db DbWrapper) Close() error

func (DbWrapper) Delete

func (db DbWrapper) Delete(ctx context.Context, table string, key string) (err error)

func (DbWrapper) InitThread

func (db DbWrapper) InitThread(ctx context.Context, threadID int, threadCount int) context.Context

func (DbWrapper) Insert

func (db DbWrapper) Insert(ctx context.Context, table string, key string, values map[string][]byte) (err error)

func (DbWrapper) Read

func (db DbWrapper) Read(ctx context.Context, table string, key string, fields []string) (_ map[string][]byte, err error)

func (DbWrapper) Scan

func (db DbWrapper) Scan(ctx context.Context, table string, startKey string, count int, fields []string) (_ []map[string][]byte, err error)

func (DbWrapper) Update

func (db DbWrapper) Update(ctx context.Context, table string, key string, values map[string][]byte) (err error)

Jump to

Keyboard shortcuts

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