fio

package
v0.3.0-8 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executable

type Executable interface {
	Exec() (*Result, error)
	OnRawOutput(func([]byte))
}

Executable represents an operation that can produce an fio result and emit raw output data.

func NewJob

func NewJob(name string, args []string) Executable

NewJob constructs a Job with the default dependencies

type Job

type Job struct {
	// Required fields:
	// ----------------------
	Name string
	Args []string
	// contains filtered or unexported fields
}

Job is a concrete Executable for executing fio jobs

func (*Job) Exec

func (job *Job) Exec() (*Result, error)

Exec runs the given fio job in a temporary directory

func (*Job) OnRawOutput

func (job *Job) OnRawOutput(callback func([]byte))

OnRawOutput sets the callback to receive standard output from the fio command.

type JobModeResult

type JobModeResult struct {
	Iops       float64 `json:"iops"`
	IopsMin    int64   `json:"iops_min"`
	IopsMax    int64   `json:"iops_max"`
	IopsMean   float64 `json:"iops_mean"`
	IopsStddev float64 `json:"iops_stddev"`

	LatNs ResultStats `json:"lat_ns"`
}

JobModeResult represents the measurements for a given test mode (e.g. read, write). Not all modes provide all values. The populated values depend on the fio job parameters.

type JobResult

type JobResult struct {
	Sync  JobModeResult `json:"sync"`
	Read  JobModeResult `json:"read"`
	Write JobModeResult `json:"write"`
}

JobResult represents the results from an individual fio job. A FioResult may include multiple job results.

type Percentile

type Percentile struct {
	NinetyNinth int64 `json:"99.000000"`
}

Percentile provides a simple interface to return particular statistical percentiles from the fio stats results.

type Result

type Result struct {
	Version string      `json:"fio version"`
	Jobs    []JobResult `json:"jobs"`
}

Result is a data structure that represents the JSON output returned from running `fio`.

type ResultStats

type ResultStats struct {
	Min        int64      `json:"min"`
	Max        int64      `json:"max"`
	Mean       float64    `json:"mean"`
	StdDev     float64    `json:"stddev"`
	N          int64      `json:"N"`
	Percentile Percentile `json:"percentile"`
}

ResultStats represents the statistical measurements provided by fio.

Jump to

Keyboard shortcuts

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