dsdbench

package module
v0.0.0-...-635c817 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2017 License: MIT Imports: 15 Imported by: 0

README

Docker Storage Driver Benchmarks and Tests Go Report Card

dsdbench runs benchmarks and tests for storage driver configurations to help figure out how the configuration will perform and which known issues the daemon may be affected by in this configuration.

Usage

dsdbench makes use of the golang testing package. The tests may need to be run as root in order to successfully mount. Use DOCKER_GRAPHDRIVER and DOCKER_GRAPHDRIVER_OPTIONS environment variables to configure.

Run tests
$ DOCKER_GRAPHDRIVER=overlay2 go test -v .
Run benchmarks
$ DOCKER_GRAPHDRIVER=overlay2 go test -run=NONE -v -bench .

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDirectoryEqual

func CheckDirectoryEqual(d1, d2 string) error

CheckDirectoryEqual compares two directory paths to make sure that the content of the directories is the same.

func CheckLayer

func CheckLayer(ls layer.Store, layerID layer.ChainID, layerFuncs ...LayerInit) error

CheckLayer checks that the provider layer directory content exactly matches a directory created using the provided layer initializers.

func CheckLayerDiff

func CheckLayerDiff(expected []byte, layer layer.Layer) error

CheckLayerDiff checks that the diff stream for the provided layer exactly matches the provided byte array.

func CheckMetadata

func CheckMetadata(metadata, expectedMetadata []layer.Metadata) error

CheckMetadata checks that 2 metadata arrays are equal

func CheckSameLayer

func CheckSameLayer(l1, l2 layer.Layer) error

CheckSameLayer checks whether the 2 provides layers are same. The layers must have the exact same digests, size, and parents.

func CreateLayer

func CreateLayer(ls layer.Store, parent layer.ChainID, layerFunc LayerInit) (l layer.Layer, err error)

CreateLayer creates a new layer in the layer store using the given layer initialize function on top of the given parent.

func CreateLayerChain

func CreateLayerChain(ls layer.Store, layerFuncs ...LayerInit) (l layer.Layer, err error)

CreateLayerChain creates a new chain of layers in the given layer store using the provided layer initializers and returns the topmost layer.

func CreateMetadata

func CreateMetadata(layers ...layer.Layer) ([]layer.Metadata, error)

CreateMetadata creates a metadata array from the provided layers in a manner that would be returned from the layer store on removal.

func TarFromFiles

func TarFromFiles(files ...ApplyFile) ([]byte, error)

TarFromFiles returns an uncompressed tar byte array created from using the provided file appliers.

Types

type ApplyFile

type ApplyFile func(root string) error

ApplyFile applies single file changes

func Chown

func Chown(name string, uid, gid int) ApplyFile

Chown returns a file applier which changes the ownership of a file

func CreateDirectory

func CreateDirectory(name string, perm os.FileMode) ApplyFile

CreateDirectory returns a file applier to create the directory with the provided name and permission

func NewTestFile

func NewTestFile(name string, content []byte, perm os.FileMode) ApplyFile

NewTestFile returns a file applier which creates a file as the provided name with the given content and permission.

func RemoveFile

func RemoveFile(name string) ApplyFile

RemoveFile returns a file applier which removes the provided file name

func Rename

func Rename(old, new string) ApplyFile

Rename returns a file applier which renames a file

type LayerInit

type LayerInit func(root string) error

LayerInit initializes a layer using the provided root

func InitWithFiles

func InitWithFiles(files ...ApplyFile) LayerInit

InitWithFiles returns a layer initializer from the given file appliers

Jump to

Keyboard shortcuts

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