benchmark

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Benchmark

type Benchmark struct {
	IExecutable
	Context IExecutionContext
	// contains filtered or unexported fields
}

func NewBenchmark

func NewBenchmark(name string, description string, benchmarkType string) *Benchmark

func (*Benchmark) Description

func (c *Benchmark) Description() string

func (*Benchmark) GetContext

func (c *Benchmark) GetContext() IExecutionContext

func (*Benchmark) Name

func (c *Benchmark) Name() string

func (*Benchmark) SetContext

func (c *Benchmark) SetContext(value IExecutionContext)

func (*Benchmark) Type

func (c *Benchmark) Type() string

type BenchmarkSuite

type BenchmarkSuite struct {
	IPrepared
	// contains filtered or unexported fields
}

func NewBenchmarkSuite

func NewBenchmarkSuite(name string, description string) *BenchmarkSuite

func (*BenchmarkSuite) AddBenchmark

func (c *BenchmarkSuite) AddBenchmark(benchmark *Benchmark) *Benchmark

func (*BenchmarkSuite) AddParameter

func (c *BenchmarkSuite) AddParameter(parameter *Parameter) *Parameter

func (*BenchmarkSuite) Benchmarks

func (c *BenchmarkSuite) Benchmarks() []*Benchmark

func (*BenchmarkSuite) CreateBenchmark

func (c *BenchmarkSuite) CreateBenchmark(name string, description string, executeCallback func() error) *Benchmark

func (*BenchmarkSuite) CreateParameter

func (c *BenchmarkSuite) CreateParameter(name string, description string, defaultValue string) *Parameter

func (*BenchmarkSuite) Description

func (c *BenchmarkSuite) Description() string

func (*BenchmarkSuite) GetContext

func (c *BenchmarkSuite) GetContext() IExecutionContext

func (*BenchmarkSuite) Name

func (c *BenchmarkSuite) Name() string

func (*BenchmarkSuite) Parameters

func (c *BenchmarkSuite) Parameters() map[string]*Parameter

func (*BenchmarkSuite) SetContext

func (c *BenchmarkSuite) SetContext(value IExecutionContext)

func (*BenchmarkSuite) SetUp

func (c *BenchmarkSuite) SetUp() error

func (*BenchmarkSuite) TearDown

func (c *BenchmarkSuite) TearDown() error

type DelegatedBenchmark

type DelegatedBenchmark struct {
	*Benchmark
	// contains filtered or unexported fields
}

func NewDelegatedBenchmark

func NewDelegatedBenchmark(name string, description string,
	executeCallback func() error) *DelegatedBenchmark

func (*DelegatedBenchmark) Execute

func (c *DelegatedBenchmark) Execute() error

type IExecutable

type IExecutable interface {
	Execute() error
	SetUp() error
	TearDown() error
}

type IExecutionContext

type IExecutionContext interface {
	GetParameters() map[string]*Parameter
	IncrementCounter(increment int)
	SendMessage(message string)
	ReportError(err error)
	//isStopped bool
	Stop()
}

type IParameter

type IParameter interface {
	GetValue() string
	SetValue(value string)
}

type IPrepared added in v1.0.3

type IPrepared interface {
	SetUp() error
	TearDown() error
}

type Parameter

type Parameter struct {
	IParameter
	// contains filtered or unexported fields
}

func NewParameter

func NewParameter(name string, description string, defaultValue string, paramType string) *Parameter

func (*Parameter) DefaultValue

func (c *Parameter) DefaultValue() string

func (*Parameter) Description

func (c *Parameter) Description() string

func (*Parameter) GetAsBoolean

func (c *Parameter) GetAsBoolean() bool

func (*Parameter) GetAsBooleanWithDefault

func (c *Parameter) GetAsBooleanWithDefault(defaultValue bool) bool

func (*Parameter) GetAsDouble

func (c *Parameter) GetAsDouble() float64

func (*Parameter) GetAsDoubleWithDefault

func (c *Parameter) GetAsDoubleWithDefault(defaultValue float64) float64

func (*Parameter) GetAsFloat

func (c *Parameter) GetAsFloat() float32

func (*Parameter) GetAsFloatWithDefault

func (c *Parameter) GetAsFloatWithDefault(defaultValue float32) float32

func (*Parameter) GetAsInteger

func (c *Parameter) GetAsInteger() int

func (*Parameter) GetAsIntegerWithDefault

func (c *Parameter) GetAsIntegerWithDefault(defaultValue int) int

func (*Parameter) GetAsLong

func (c *Parameter) GetAsLong() int32

func (*Parameter) GetAsLongWithDefault

func (c *Parameter) GetAsLongWithDefault(defaultValue int32) int32

func (*Parameter) GetAsNullableBoolean

func (c *Parameter) GetAsNullableBoolean() bool

func (*Parameter) GetAsNullableDouble

func (c *Parameter) GetAsNullableDouble() float64

func (*Parameter) GetAsNullableFloat

func (c *Parameter) GetAsNullableFloat() float32

func (*Parameter) GetAsNullableInteger

func (c *Parameter) GetAsNullableInteger() int

func (*Parameter) GetAsNullableLong

func (c *Parameter) GetAsNullableLong() int32

func (*Parameter) GetAsNullableString

func (c *Parameter) GetAsNullableString() *string

func (*Parameter) GetAsString

func (c *Parameter) GetAsString() string

func (*Parameter) GetAsStringWithDefault

func (c *Parameter) GetAsStringWithDefault(defaultValue string) string

func (*Parameter) Name

func (c *Parameter) Name() string

func (*Parameter) SetAsBoolean

func (c *Parameter) SetAsBoolean(value bool)

func (*Parameter) SetAsDouble

func (c *Parameter) SetAsDouble(value float64)

func (*Parameter) SetAsFloat

func (c *Parameter) SetAsFloat(value float32)

func (*Parameter) SetAsInteger

func (c *Parameter) SetAsInteger(value int)

func (*Parameter) SetAsLong

func (c *Parameter) SetAsLong(value int32)

func (*Parameter) SetAsString

func (c *Parameter) SetAsString(value string)

func (*Parameter) SetValue

func (c *Parameter) SetValue(value string)

func (*Parameter) Type

func (c *Parameter) Type() string

func (*Parameter) Value

func (c *Parameter) Value() string

type PassiveBenchmark

type PassiveBenchmark struct {
	*Benchmark
}

func NewPassiveBenchmark

func NewPassiveBenchmark(name string, description string) *PassiveBenchmark

func (*PassiveBenchmark) Execute

func (c *PassiveBenchmark) Execute() error

Jump to

Keyboard shortcuts

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