perf

package
v0.0.0-...-1cadeb9 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OptionsDefaults = Options{

	"testdata",
	10000,
	10,
	false,
	false,
}

Functions

This section is empty.

Types

type Executable

type Executable interface {
	Init() error
	Close() error
	Size() (uint64, error)
	RemoveAll() error
	RemoveBulk(items []*models.Entity) error
	PutAsync(*models.Entity) error
	AwaitAsyncCompletion() error
	PutBulk(items []*models.Entity) error
	ReadAll() ([]*models.Entity, error)
	QueryIdBetween(min, max uint64) ([]*models.Entity, error)
	QueryStringPrefix(prefix string) ([]*models.Entity, error)
}

type Executor

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

func CreateExecutor

func CreateExecutor(executable Executable) *Executor

func (*Executor) ChangeValues

func (perf *Executor) ChangeValues(items []*models.Entity)

func (*Executor) Close

func (perf *Executor) Close()

func (*Executor) Init

func (perf *Executor) Init()

func (*Executor) PrepareData

func (perf *Executor) PrepareData(count int) []*models.Entity

func (*Executor) PrintTimes

func (perf *Executor) PrintTimes(functions []string)

func (*Executor) PutAsync

func (perf *Executor) PutAsync(items []*models.Entity)

func (*Executor) PutBulk

func (perf *Executor) PutBulk(items []*models.Entity)

func (*Executor) Query100IdsBetween

func (perf *Executor) Query100IdsBetween(min, max uint64)

func (*Executor) QueryStringPrefix

func (perf *Executor) QueryStringPrefix(prefix string, expectedCount int)

func (*Executor) ReadAll

func (perf *Executor) ReadAll(expectedCount int) []*models.Entity

func (*Executor) RemoveAll

func (perf *Executor) RemoveAll()

func (*Executor) RemoveBulk

func (perf *Executor) RemoveBulk(items []*models.Entity)

func (*Executor) Run

func (perf *Executor) Run(options Options)

func (*Executor) UpdateBulk

func (perf *Executor) UpdateBulk(items []*models.Entity)

type Options

type Options struct {
	Path     string
	Count    int
	Runs     int
	ManualGc bool
	Profile  bool
}

Jump to

Keyboard shortcuts

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