config

package
v0.0.0-...-3e87057 Latest Latest
Warning

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

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

Documentation

Overview

Package config provides the config types and helper functions for zstorbench

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupClientConfig

func SetupClientConfig(c *daemon.Config)

SetupClientConfig sets up the client.Client for a benchmark. Sets random namespace if empty

Types

type BencherMethod

type BencherMethod uint8

BencherMethod represents the method of benchmarking

const (
	// BencherRead represents a reading benchmark
	BencherRead BencherMethod = iota
	// BencherWrite represents a writing benchmark
	BencherWrite
)

func (BencherMethod) MarshalText

func (bm BencherMethod) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.MarshalText

func (BencherMethod) String

func (bm BencherMethod) String() string

String implements Stringer.String

func (*BencherMethod) UnmarshalText

func (bm *BencherMethod) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.UnmarshalText

type BenchmarkConfig

type BenchmarkConfig struct {
	Method     BencherMethod `yaml:"method"`
	Output     string        `yaml:"result_output"`
	Duration   int           `yaml:"duration"`
	Operations int           `yaml:"operations"`
	Clients    int           `yaml:"clients"`
	KeySize    int           `yaml:"key_size" validate:"nonzero"`
	ValueSize  int           `yaml:"value_size" validate:"nonzero"`
}

BenchmarkConfig represents benchmark configuration

type ClientConf

type ClientConf struct {
	Scenarios map[string]Scenario `yaml:"scenarios" validate:"nonzero"`
}

ClientConf represents a client banchmark config

func UnmarshalYAML

func UnmarshalYAML(b []byte) (*ClientConf, error)

UnmarshalYAML returns client config from a given reader

type Scenario

type Scenario struct {
	ZstorConf daemon.Config   `yaml:"zstor" validate:"nonzero"`
	BenchConf BenchmarkConfig `yaml:"benchmark" validate:"nonzero"`
}

Scenario represents a scenario

Jump to

Keyboard shortcuts

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