fsbench

package module
v0.0.0-...-ca7265f Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2015 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KB = 1024
	MB = 1024 * KB
	GB = 1024 * MB
)
View Source
const (
	DirectoryLength = 2
	FilenameLength  = 32
	FileExtension   = ".rand"
)

Variables

View Source
var (
	RandomSampleSize int64 = 10 * MB
)

Functions

This section is empty.

Types

type AggregatedStatus

type AggregatedStatus struct {
	Status
	Files            int                  // Number of files transferred
	Errors           int                  // Number of errors
	HistogramAvgRate *histogram.Histogram `json:"-"`
}

func NewAggregatedStatus

func NewAggregatedStatus() *AggregatedStatus

func (*AggregatedStatus) Add

func (s *AggregatedStatus) Add(a Status)

func (*AggregatedStatus) Sum

type Benchmark

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

func NewBenchmark

func NewBenchmark(fs fs.Client, c *Config) *Benchmark

func (*Benchmark) Init

func (b *Benchmark) Init()

func (*Benchmark) Run

func (b *Benchmark) Run() *BenchmarkStatus

func (*Benchmark) Status

func (b *Benchmark) Status() *BenchmarkStatus

type BenchmarkStatus

type BenchmarkStatus struct {
	RStatus *AggregatedStatus
	WStatus *AggregatedStatus
}

func NewBenchmarkStatus

func NewBenchmarkStatus() *BenchmarkStatus

type Config

type Config struct {
	Mode           WorkerMode
	Workers        int
	Files          int
	DirectoryDepth int
	BlockSize      int64
	FixedFileSize  int64
	MeanFileSize   int64
	StdDevFileSize float64
}

type RandomReader

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

func NewRandomReader

func NewRandomReader() *RandomReader

func (*RandomReader) Read

func (r *RandomReader) Read(b []byte) (int, error)

type Status

type Status struct {
	Duration time.Duration // Time period covered by the statistics
	Bytes    int64         // Total number of bytes transferred
	AvgRate  int64         // Average transfer rate (Bytes / Duration)
}

func NewStatus

func NewStatus(fs flowrate.Status) Status

type Worker

type Worker struct {
	WStatus *AggregatedStatus
	RStatus *AggregatedStatus
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(fs fs.Client, c *WorkerConfig) *Worker

func (*Worker) Read

func (w *Worker) Read() error

func (*Worker) Write

func (w *Worker) Write() error

type WorkerConfig

type WorkerConfig struct {
	Files          int
	DirectoryDepth int
	BlockSize      int64
	FixedFileSize  int64
	MeanFileSize   int64
	StdDevFileSize float64
}

type WorkerMode

type WorkerMode int
const (
	WriteMode WorkerMode = 1
	ReadMode  WorkerMode = 2
)

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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