filebench

package
v0.0.0-...-44c758a Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const ReplicateTargetBytes int = 1e9

ReplicateTargetBytes limits the number of replicates of a single benchmark condition.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bigmachine

type Bigmachine struct {
	// Bs is the collection of bigmachines in which to run benchmarks. EC2 instance type is a
	// property of *bigmachine.B, so this lets callers benchmark several EC2 instance types.
	// (*B).Name() is printed to identify resutls. Caller remains responsible for shutdown.
	Bs       []*bigmachine.B
	Environ  bigmachine.Environ
	Services bigmachine.Services
}

Bigmachine configures a cluster of remote machines to each execute benchmarks and then report their results.

func NewBigmachine

func NewBigmachine(rs ReadSizes) Bigmachine

NewBigmachine returns a new configuration, ready for callers to configure. Callers likely want to add bigmachines for remote execution (otherwise it just falls back to local). Or, they may add environment variables or services for AWS credentials.

func (Bigmachine) AddS3FUSE

func (d Bigmachine) AddS3FUSE() (mountPath string)

AddS3FUSE configures d so that each machine running benchmarks can access S3 objects through the local filesystem, at mountPath. For example, object s3://b/my/key will appear at $mountPath/b/my/key. Callers can use this to construct paths for RunAndPrint.

func (Bigmachine) RunAndPrint

func (d Bigmachine) RunAndPrint(
	ctx context.Context,
	out io.Writer,
	pathPrefixes []Prefix,
	pathSuffix0 string,
	pathSuffixes ...string,
) error

RunAndPrint starts a machine in each d.Bs and then executes ReadSizes.RunAndPrint on it. It writes all the machine results to out, identifying each section by d.Bs's keys.

type Prefix

type Prefix struct {
	Path string
	// MaxReadBytes optionally overrides ReadSizes.MaxReadBytes (only to become smaller).
	// Useful if one prefix (like FUSE) is slower than others.
	MaxReadBytes int
}

type ReadSizes

type ReadSizes struct {
	ChunkBytes       []int
	ContiguousChunks []int
	MaxReadBytes     int
	MaxReplicates    int
}

ReadSizes are the parameters for a benchmark run.

func DefaultReadSizes

func DefaultReadSizes() ReadSizes

DefaultReadSizes constructs ReadSizes with the default range of parameters.

func (ReadSizes) MinFileSize

func (r ReadSizes) MinFileSize() int

func (ReadSizes) RunAndPrint

func (r ReadSizes) RunAndPrint(
	ctx context.Context,
	out io.Writer,
	pathPrefixes []Prefix,
	pathSuffix0 string,
	pathSuffixes ...string,
)

RunAndPrint executes the benchmark cases and prints a human-readable summary to out. pathPrefixes is typically s3:// or a FUSE mount point. Results are reported for each one. pathSuffix* are at least one S3-relative path (like bucket/some/file.txt) to a large file to read during benchmarking. If there are multiple, reads are spread across them (not multiplied for each suffix). Caller may want to pass multiple to try to reduce throttling when several benchmark tasks are running in parallel (see Bigmachine.RunAndPrint).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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