fsbench

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package fsbench provides utility functions for filesystem benchmarks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWithDifferentFilesystems

func RunWithDifferentFilesystems(ctx context.Context, b *testing.B, machine harness.Machine, bm FSBenchmark)

RunWithDifferentFilesystems runs a

Types

type FSBenchmark

type FSBenchmark struct {
	// Image is the Docker image to load.
	Image string
	// WorkDir is where the action takes place.
	// The commands below are run from a directory that has the same file as what the container image
	// has at this directory.
	WorkDir string
	// RunCmd is the command to run to execute the benchmark.
	RunCmd []string
	// WantOutput, if set, is verified to be a substring of the output of RunCmd.
	WantOutput string
	// CleanCmd, if set, is run to clean up between benchmarks.
	CleanCmd []string
	// Variants is a list of benchmark variants to run.
	// If unset, the typical set is used.
	Variants []Variant
	// Callback is an optional function that is called after each execution of
	// the workload being benchmarked. It can be used to perform workload
	// specific metric reporting.
	Callback func(b *testing.B, output string)
}

FSBenchmark represents a set of work to perform within a container that is instrumented with different filesystem configurations.

type Variant

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

Variant is a specific configuration for a benchmark. Dimensions here are clean/dirty cache (do or don't drop caches) and if the mount on which we are compiling is a tmpfs/bind mount.

func TypicalVariants

func TypicalVariants() []Variant

TypicalVariants returns the typical full set of benchmark variants.

Jump to

Keyboard shortcuts

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