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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
fsbench command

Jump to

Keyboard shortcuts

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