loadtest

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const FileCountInCommit = 20

Variables

View Source
var (
	ErrCreateClient = errors.New("failed to create lakeFS client")
	ErrTestErrors   = errors.New("got errors during loadtest, see output for details")
)

Functions

func AddRequestType

func AddRequestType(tgt *vegeta.Target, typ string)

func GetRequestType

func GetRequestType(res vegeta.Result) string

Types

type Config

type Config struct {
	FreqPerSecond    int
	Duration         time.Duration
	MaxWorkers       uint64
	RepoName         string
	StorageNamespace string
	KeepRepo         bool
	Credentials      model.Credential
	ServerAddress    string
}

type Loader

type Loader struct {
	Reader       *io.PipeReader
	Writer       *io.PipeWriter
	Config       Config
	NewRepoName  string
	Metrics      map[string]*vegeta.Metrics
	TotalMetrics *vegeta.Metrics
}

func NewLoader

func NewLoader(config Config) *Loader

func (*Loader) Run

func (t *Loader) Run() error

type SafeBuffer

type SafeBuffer struct {
	bytes.Buffer
	sync.Mutex
}

func (*SafeBuffer) Read

func (s *SafeBuffer) Read(p []byte) (n int, err error)

func (*SafeBuffer) Write

func (s *SafeBuffer) Write(p []byte) (n int, err error)

type Scenario

type Scenario interface {
	Play(loader Loader, stopCh chan struct{}) <-chan vegeta.Target
}

type SimpleScenario

type SimpleScenario struct {
	FileCountInCommit int
}

func (*SimpleScenario) Play

func (s *SimpleScenario) Play(serverAddress string, repoName string, stopCh chan struct{}) <-chan vegeta.Target

type TargetGenerator

type TargetGenerator struct {
	ServerAddress string
}

func (*TargetGenerator) GenerateBranchTarget

func (t *TargetGenerator) GenerateBranchTarget(repo, name string) vegeta.Target

func (*TargetGenerator) GenerateCommitTarget

func (t *TargetGenerator) GenerateCommitTarget(repo, branch, msg string) vegeta.Target

func (*TargetGenerator) GenerateCreateFileTargets

func (t *TargetGenerator) GenerateCreateFileTargets(repo, branch string, num int) []vegeta.Target

func (*TargetGenerator) GenerateDiffTarget

func (t *TargetGenerator) GenerateDiffTarget(repo, branch string) vegeta.Target

func (*TargetGenerator) GenerateListTarget

func (t *TargetGenerator) GenerateListTarget(repo, branch string, amount int) vegeta.Target

func (*TargetGenerator) GenerateMergeToMasterTarget

func (t *TargetGenerator) GenerateMergeToMasterTarget(repo, branch string) vegeta.Target

Jump to

Keyboard shortcuts

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