traffic

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

package traffic generates filesystem traffic useful for testing and benchmarking

Index

Constants

View Source
const (
	R RW = iota
	W
	File Object = iota
	Commit
	Branch
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

type Object int

Object enumerates the objects that exist in a filesystem

type Op

type Op struct {
	RW     RW
	Object Object
	Path   string
	Commit string
	Branch string
	Data   string
}

Op describes an operation on a filesystem

type RW

type RW int

RW indicates if the operation is a read or a write

type Workload

type Workload []Op

Workload describe work to be done on the server. We generate workloads in specific ways such that read operations (o.RW == R) can be taken as facts about the system. For example a read operation on a file will indicate with its Data file what the file should look like right now

func (Workload) Facts

func (w Workload) Facts() Workload

Computes Facts that can be derived from a workload. Facts are read Ops that should perform as true.

func (Workload) FileValue

func (w Workload) FileValue(path, commit, branch string) string

func (Workload) Generate

func (w Workload) Generate(rand *rand.Rand, size int) reflect.Value

Jump to

Keyboard shortcuts

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