load

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, project *uplink.Project, bucket string, key string) (err error)

func Download

func Download(ctx context.Context, project *uplink.Project, bucket string, key string) (res []byte, err error)

func Upload

func Upload(ctx context.Context, project *uplink.Project, source []byte, bucket string, key string, duration time.Duration) (err error)

Types

type Load

type Load struct {
	Uplink        Uplink        `cmd:"" help:"load generator with uplink upload/download"`
	Stat          Stat          `cmd:"" help:"load generator with uplink StatObject"`
	PieceUpload   PieceUpload   `cmd:"" usage:"execute upload with pieces store client"`
	PieceDownload PieceDownload `cmd:"" usage:"execute download with pieces store client"`
}

type PieceDownload

type PieceDownload struct {
	util.DialerHelper
	util.WithKeySigner
	Runner
	NodeURL   storj.NodeURL
	PieceSize memory.Size `default:"1024"`
}

func (*PieceDownload) Run

func (p *PieceDownload) Run() error

type PieceIDStream

type PieceIDStream struct {
	Seed uint32
	// contains filtered or unexported fields
}

func (*PieceIDStream) NextPieceID

func (p *PieceIDStream) NextPieceID() storj.PieceID

type PieceUpload

type PieceUpload struct {
	util.DialerHelper
	util.WithKeySigner
	Runner
	NodeURL   storj.NodeURL
	Slow      time.Duration
	PieceSize memory.Size `default:"1024"`
}

func (*PieceUpload) Run

func (p *PieceUpload) Run() error

type Runner

type Runner struct {
	Workers int `default:"1"`
	Limit   int `default:"1"`
	PieceIDStream
}

func (Runner) RunTest

func (p Runner) RunTest(test func(ctx context.Context, p storj.PieceID) error)

type SlowReader

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

func (SlowReader) Read

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

type Stat

type Stat struct {
	Verbose bool   `help:"Print out more information"`
	Path    string `arg:"" name:"path" help:"path to the file to be uploaded"`
	Sample  int    `short:"n"  default:"10" help:"Number of executions ON EACH go routine"`
	Thread  int    `short:"t"  default:"1" help:"Number of parallel Go routines"`
}

func (*Stat) Run

func (u *Stat) Run() error
type Uplink struct {
	Verbose        bool          `help:"Print out more information"`
	Path           string        `arg:"" name:"path" help:"path to the file to be uploaded"`
	Sample         int           `short:"n"  default:"10" help:"Number of executions ON EACH go routine"`
	Thread         int           `short:"t"  default:"1" help:"Number of parallel Go routines"`
	Size           int           `short:"s" size:"4194304" help:"Size of the files to be uploaded"`
	TTL            time.Duration `default:"0" help:"Time to live for the uploaded object"`
	EnableDownload bool          `default:"false" help:"Enable download as part of the test"`
	EnableDelete   bool          `default:"false" help:"Enable deletion as part of the test (set TTL if you don't use it'!)"`
	// contains filtered or unexported fields
}

func (*Uplink) Run

func (u *Uplink) Run() error

func (*Uplink) Test

func (u *Uplink) Test(ix int, ctx context.Context, key string, cfg uplink.Config, access *uplink.Access, bucket string, wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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