runner

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: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BenchmarkBuilder

type BenchmarkBuilder struct {
	Runner *BenchmarkRunner
}

func NewBenchmarkBuilder

func NewBenchmarkBuilder() *BenchmarkBuilder

func (*BenchmarkBuilder) AddSuite

func (*BenchmarkBuilder) Create

func (c *BenchmarkBuilder) Create() *BenchmarkRunner

func (*BenchmarkBuilder) ExecuteAs

func (c *BenchmarkBuilder) ExecuteAs(executionType ExecutionType) *BenchmarkBuilder

func (*BenchmarkBuilder) ForDuration

func (c *BenchmarkBuilder) ForDuration(duration int64) *BenchmarkBuilder

func (*BenchmarkBuilder) ForceContinue

func (c *BenchmarkBuilder) ForceContinue(isForceContinue bool) *BenchmarkBuilder

func (*BenchmarkBuilder) MeasureAs

func (c *BenchmarkBuilder) MeasureAs(measurementType MeasurementType) *BenchmarkBuilder

func (*BenchmarkBuilder) WithAllBenchmarks

func (c *BenchmarkBuilder) WithAllBenchmarks() *BenchmarkBuilder

func (*BenchmarkBuilder) WithBenchmark

func (c *BenchmarkBuilder) WithBenchmark(name string) *BenchmarkBuilder

func (*BenchmarkBuilder) WithNominalRate

func (c *BenchmarkBuilder) WithNominalRate(nominalRate float64) *BenchmarkBuilder

func (*BenchmarkBuilder) WithParameter

func (c *BenchmarkBuilder) WithParameter(name string, value string) *BenchmarkBuilder

func (*BenchmarkBuilder) WithProportionalBenchmark added in v1.0.2

func (c *BenchmarkBuilder) WithProportionalBenchmark(name string, proportion float32) *BenchmarkBuilder

type BenchmarkInstance

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

func NewBenchmarkInstance

func NewBenchmarkInstance(suite *BenchmarkSuiteInstance, benchmark *benchmark.Benchmark) *BenchmarkInstance

func (*BenchmarkInstance) Benchmark

func (c *BenchmarkInstance) Benchmark() *benchmark.Benchmark

func (*BenchmarkInstance) Description

func (c *BenchmarkInstance) Description() string

func (*BenchmarkInstance) Execute

func (c *BenchmarkInstance) Execute() error

func (*BenchmarkInstance) FullName

func (c *BenchmarkInstance) FullName() string

func (*BenchmarkInstance) GetProportion

func (c *BenchmarkInstance) GetProportion() int

func (*BenchmarkInstance) GetStartRange

func (c *BenchmarkInstance) GetStartRange() int

func (*BenchmarkInstance) GetendRange

func (c *BenchmarkInstance) GetendRange() int

func (*BenchmarkInstance) IsPassive

func (c *BenchmarkInstance) IsPassive() bool

func (*BenchmarkInstance) IsSelected

func (c *BenchmarkInstance) IsSelected() bool

func (*BenchmarkInstance) Name

func (c *BenchmarkInstance) Name() string

func (*BenchmarkInstance) Select

func (c *BenchmarkInstance) Select(value bool)

func (*BenchmarkInstance) SetEndRange

func (c *BenchmarkInstance) SetEndRange(value int)

func (*BenchmarkInstance) SetProportion

func (c *BenchmarkInstance) SetProportion(value int)

func (*BenchmarkInstance) SetStartRange

func (c *BenchmarkInstance) SetStartRange(value int)

func (*BenchmarkInstance) SetUp

func (*BenchmarkInstance) Suite

func (*BenchmarkInstance) TearDown

func (c *BenchmarkInstance) TearDown() error

func (*BenchmarkInstance) WithinRange

func (c *BenchmarkInstance) WithinRange(proportion int) bool

type BenchmarkMeter

type BenchmarkMeter struct {
	LastMeasuredTime time.Time

	IPerfomedMesurement
	// contains filtered or unexported fields
}

func NewBenchmarkMeter

func NewBenchmarkMeter() *BenchmarkMeter

func (*BenchmarkMeter) CalculateAggregates

func (c *BenchmarkMeter) CalculateAggregates()

func (*BenchmarkMeter) Clear

func (c *BenchmarkMeter) Clear()

func (*BenchmarkMeter) GetAverageValue

func (c *BenchmarkMeter) GetAverageValue() float64

func (*BenchmarkMeter) GetCurrentValue

func (c *BenchmarkMeter) GetCurrentValue() float64

func (*BenchmarkMeter) GetLastMeasuredTime

func (c *BenchmarkMeter) GetLastMeasuredTime() time.Time

func (*BenchmarkMeter) GetMinValue

func (c *BenchmarkMeter) GetMinValue() float64

func (*BenchmarkMeter) GetmaxValue

func (c *BenchmarkMeter) GetmaxValue() float64

func (*BenchmarkMeter) Measure

func (c *BenchmarkMeter) Measure() float64

func (*BenchmarkMeter) Measurement

func (c *BenchmarkMeter) Measurement() *Measurement

func (*BenchmarkMeter) SetAverageValue

func (c *BenchmarkMeter) SetAverageValue(value float64)

func (*BenchmarkMeter) SetCurrentValue

func (c *BenchmarkMeter) SetCurrentValue(value float64)

func (*BenchmarkMeter) SetLastMeasuredTime

func (c *BenchmarkMeter) SetLastMeasuredTime(value time.Time)

func (*BenchmarkMeter) SetMaxValue

func (c *BenchmarkMeter) SetMaxValue(value float64)

func (*BenchmarkMeter) SetMinValue

func (c *BenchmarkMeter) SetMinValue(value float64)

type BenchmarkProportionParameter

type BenchmarkProportionParameter struct {
	*bench.Parameter
	// contains filtered or unexported fields
}

func NewBenchmarkProportionParameter

func NewBenchmarkProportionParameter(benchmark *BenchmarkInstance) *BenchmarkProportionParameter

func (*BenchmarkProportionParameter) GetValue

func (c *BenchmarkProportionParameter) GetValue() string

func (*BenchmarkProportionParameter) SetValue

func (c *BenchmarkProportionParameter) SetValue(value string)

type BenchmarkResult

type BenchmarkResult struct {
	Benchmarks             []*BenchmarkInstance
	StartTime              time.Time
	ElapsedTime            time.Duration
	PerformanceMeasurement *Measurement
	CpuLoadMeasurement     *Measurement
	MemoryUsageMeasurement *Measurement
	Errors                 []error
}

func NewBenchmarkResult

func NewBenchmarkResult() *BenchmarkResult

type BenchmarkRunner

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

func NewBenchmarkRunner

func NewBenchmarkRunner() *BenchmarkRunner

func (*BenchmarkRunner) Benchmarks

func (c *BenchmarkRunner) Benchmarks() *BenchmarksManager

func (*BenchmarkRunner) Configuration

func (c *BenchmarkRunner) Configuration() *ConfigurationManager

func (*BenchmarkRunner) Environment

func (c *BenchmarkRunner) Environment() *EnvironmentManager

func (*BenchmarkRunner) Execution

func (c *BenchmarkRunner) Execution() *ExecutionManager

func (*BenchmarkRunner) IsRunning

func (c *BenchmarkRunner) IsRunning() bool

func (*BenchmarkRunner) Parameters

func (c *BenchmarkRunner) Parameters() *ParametersManager

func (*BenchmarkRunner) Report

func (c *BenchmarkRunner) Report() *ReportGenerator

func (*BenchmarkRunner) Results

func (c *BenchmarkRunner) Results() *ResultsManager

func (*BenchmarkRunner) Run

func (c *BenchmarkRunner) Run(callback func(error))

func (*BenchmarkRunner) Start

func (c *BenchmarkRunner) Start()

func (*BenchmarkRunner) Stop

func (c *BenchmarkRunner) Stop()

type BenchmarkSelectedParameter

type BenchmarkSelectedParameter struct {
	*bench.Parameter
	// contains filtered or unexported fields
}

func NewBenchmarkSelectedParameter

func NewBenchmarkSelectedParameter(benchmark *BenchmarkInstance) *BenchmarkSelectedParameter

func (*BenchmarkSelectedParameter) GetValue

func (c *BenchmarkSelectedParameter) GetValue() string

func (*BenchmarkSelectedParameter) SetValue

func (c *BenchmarkSelectedParameter) SetValue(value string)

type BenchmarkSuiteInstance

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

func NewBenchmarkSuiteInstance

func NewBenchmarkSuiteInstance(suite *benchmark.BenchmarkSuite) *BenchmarkSuiteInstance

func (*BenchmarkSuiteInstance) Benchmarks

func (c *BenchmarkSuiteInstance) Benchmarks() []*BenchmarkInstance

func (*BenchmarkSuiteInstance) Description

func (c *BenchmarkSuiteInstance) Description() string

func (*BenchmarkSuiteInstance) IsSelected

func (c *BenchmarkSuiteInstance) IsSelected() []*BenchmarkInstance

func (*BenchmarkSuiteInstance) Name

func (c *BenchmarkSuiteInstance) Name() string

func (*BenchmarkSuiteInstance) Parameters

func (c *BenchmarkSuiteInstance) Parameters() []*benchmark.Parameter

func (*BenchmarkSuiteInstance) SelectAll

func (c *BenchmarkSuiteInstance) SelectAll()

func (*BenchmarkSuiteInstance) SelectByName

func (c *BenchmarkSuiteInstance) SelectByName(benchmarkName string)

func (*BenchmarkSuiteInstance) SetUp

func (*BenchmarkSuiteInstance) Suite

func (*BenchmarkSuiteInstance) TearDown

func (c *BenchmarkSuiteInstance) TearDown() error

func (*BenchmarkSuiteInstance) UnselectAll

func (c *BenchmarkSuiteInstance) UnselectAll()

func (*BenchmarkSuiteInstance) UnselectByName

func (c *BenchmarkSuiteInstance) UnselectByName(benchmarkName string)

type BenchmarkSuiteParameter

type BenchmarkSuiteParameter struct {
	*bench.Parameter
	// contains filtered or unexported fields
}

func NewBenchmarkSuiteParameter

func NewBenchmarkSuiteParameter(suite *BenchmarkSuiteInstance, originalParameter *bench.Parameter) *BenchmarkSuiteParameter

func (*BenchmarkSuiteParameter) GetValue

func (c *BenchmarkSuiteParameter) GetValue() string

func (*BenchmarkSuiteParameter) SetValue

func (c *BenchmarkSuiteParameter) SetValue(value string)

type BenchmarksManager

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

func NewBenchmarksManager

func NewBenchmarksManager(parameters *ParametersManager) *BenchmarksManager

func (*BenchmarksManager) AddSuite

func (c *BenchmarksManager) AddSuite(suite interface{})

func (*BenchmarksManager) AddSuiteFromClass

func (c *BenchmarksManager) AddSuiteFromClass(suiteClassName string)

func (*BenchmarksManager) AddSuitesFromModule

func (c *BenchmarksManager) AddSuitesFromModule(moduleName string)

TODO: Fix dynamic load suit

func (*BenchmarksManager) Clear

func (c *BenchmarksManager) Clear()

func (*BenchmarksManager) IsSelected

func (c *BenchmarksManager) IsSelected() []*BenchmarkInstance

func (*BenchmarksManager) RemoveSuite

func (c *BenchmarksManager) RemoveSuite(suite interface{})

func (*BenchmarksManager) RemoveSuiteByName

func (c *BenchmarksManager) RemoveSuiteByName(suiteName string)

func (*BenchmarksManager) Select

func (c *BenchmarksManager) Select(benchmarks []*BenchmarkInstance)

func (*BenchmarksManager) SelectAll

func (c *BenchmarksManager) SelectAll()

func (*BenchmarksManager) SelectByName

func (c *BenchmarksManager) SelectByName(benchmarkNames []string)

func (*BenchmarksManager) Suites

func (*BenchmarksManager) Unselect

func (c *BenchmarksManager) Unselect(benchmarks []*BenchmarkInstance)

func (*BenchmarksManager) UnselectAll

func (c *BenchmarksManager) UnselectAll()

func (*BenchmarksManager) UnselectByName

func (c *BenchmarksManager) UnselectByName(benchmarkNames []string)

type ConfigurationCallback

type ConfigurationCallback func()

type ConfigurationManager

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

func NewConfigurationManager

func NewConfigurationManager() *ConfigurationManager

func (*ConfigurationManager) AddChangeListener

func (c *ConfigurationManager) AddChangeListener(listener *ConfigurationCallback)

func (*ConfigurationManager) GetDuration

func (c *ConfigurationManager) GetDuration() int64

func (*ConfigurationManager) GetExecutionType

func (c *ConfigurationManager) GetExecutionType() ExecutionType

func (*ConfigurationManager) GetForceContinue

func (c *ConfigurationManager) GetForceContinue() bool

func (*ConfigurationManager) GetMeasurementType

func (c *ConfigurationManager) GetMeasurementType() MeasurementType

func (*ConfigurationManager) GetNominalRate

func (c *ConfigurationManager) GetNominalRate() float64

func (*ConfigurationManager) NotifyChanged

func (c *ConfigurationManager) NotifyChanged()

func (*ConfigurationManager) RemoveChangeListener

func (c *ConfigurationManager) RemoveChangeListener(listener *ConfigurationCallback)

func (*ConfigurationManager) SetDuration

func (c *ConfigurationManager) SetDuration(value int64)

func (*ConfigurationManager) SetExecutionType

func (c *ConfigurationManager) SetExecutionType(value ExecutionType)

func (*ConfigurationManager) SetForceContinue

func (c *ConfigurationManager) SetForceContinue(value bool)

func (*ConfigurationManager) SetMeasurementType

func (c *ConfigurationManager) SetMeasurementType(value MeasurementType)

func (*ConfigurationManager) SetNominalRate

func (c *ConfigurationManager) SetNominalRate(value float64)

type CpuLoadMeter

type CpuLoadMeter struct {
	*BenchmarkMeter
	// contains filtered or unexported fields
}

func NewCpuLoadMeter

func NewCpuLoadMeter() *CpuLoadMeter

func (*CpuLoadMeter) Clear

func (c *CpuLoadMeter) Clear()

func (*CpuLoadMeter) PerformMeasurement

func (c *CpuLoadMeter) PerformMeasurement() float64

type DefaultCpuBenchmark

type DefaultCpuBenchmark struct {
	*benchmark.Benchmark
	// contains filtered or unexported fields
}

func NewDefaultCpuBenchmark

func NewDefaultCpuBenchmark() *DefaultCpuBenchmark

func (*DefaultCpuBenchmark) Execute

func (c *DefaultCpuBenchmark) Execute() error

type DefaultDiskBenchmark

type DefaultDiskBenchmark struct {
	*benchmark.Benchmark
	// contains filtered or unexported fields
}

func NewDefaultDiskBenchmark

func NewDefaultDiskBenchmark() *DefaultDiskBenchmark

func (*DefaultDiskBenchmark) Execute

func (c *DefaultDiskBenchmark) Execute() error

func (*DefaultDiskBenchmark) SetUp

func (c *DefaultDiskBenchmark) SetUp() error

func (*DefaultDiskBenchmark) TearDown

func (c *DefaultDiskBenchmark) TearDown() error

type DefaultVideoBenchmark

type DefaultVideoBenchmark struct {
	*benchmark.PassiveBenchmark
}

func NewDefaultVideoBenchmark

func NewDefaultVideoBenchmark() *DefaultVideoBenchmark

type DurationParameter

type DurationParameter struct {
	*bench.Parameter
	// contains filtered or unexported fields
}

func NewDurationParameter

func NewDurationParameter(configuration *ConfigurationManager) *DurationParameter

func (*DurationParameter) GetValue

func (c *DurationParameter) GetValue() string

func (*DurationParameter) SetValue

func (c *DurationParameter) SetValue(value string)

type EnvironmentManager

type EnvironmentManager struct {
	*ExecutionManager
	// contains filtered or unexported fields
}

func NewEnvironmentManager

func NewEnvironmentManager() *EnvironmentManager

func (*EnvironmentManager) CpuMeasurement

func (c *EnvironmentManager) CpuMeasurement() float64

func (*EnvironmentManager) DiskMeasurement

func (c *EnvironmentManager) DiskMeasurement() float64

func (*EnvironmentManager) Measure

func (c *EnvironmentManager) Measure(cpu bool, disk bool, video bool) error

func (*EnvironmentManager) MeasureCpu

func (c *EnvironmentManager) MeasureCpu(callback func(result float64, err error))

func (*EnvironmentManager) MeasureDisk

func (c *EnvironmentManager) MeasureDisk(callback func(result float64, err error))

func (*EnvironmentManager) MeasureVideo

func (c *EnvironmentManager) MeasureVideo(callback func(result float64, err error))

func (*EnvironmentManager) SystemInfo

func (c *EnvironmentManager) SystemInfo() SystemInfo

func (*EnvironmentManager) VideoMeasurement

func (c *EnvironmentManager) VideoMeasurement() float64

type EnvironmentProperties

type EnvironmentProperties struct {
	*utilities.Properties
}

func NewEnvironmentProperties

func NewEnvironmentProperties() *EnvironmentProperties

func (*EnvironmentProperties) GetCpuBenchmark

func (c *EnvironmentProperties) GetCpuBenchmark() float64

func (*EnvironmentProperties) GetDiskBenchmark

func (c *EnvironmentProperties) GetDiskBenchmark() float64

func (*EnvironmentProperties) GetVideoBenchmark

func (c *EnvironmentProperties) GetVideoBenchmark() float64

func (*EnvironmentProperties) Save

func (c *EnvironmentProperties) Save()

func (*EnvironmentProperties) SetCpuBenchmark

func (c *EnvironmentProperties) SetCpuBenchmark(value float64)

func (*EnvironmentProperties) SetDiskBenchmark

func (c *EnvironmentProperties) SetDiskBenchmark(value float64)

func (*EnvironmentProperties) SetVideoBenchmark

func (c *EnvironmentProperties) SetVideoBenchmark(value float64)

type ErrorCallback

type ErrorCallback func(err error)

type ExecutionCallback

type ExecutionCallback func(status ExecutionState)

type ExecutionContext

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

implements IExecutionContext

func NewExecutionContext

func NewExecutionContext(suite *BenchmarkSuiteInstance,
	aggregator *ResultAggregator, strategy *ExecutionStrategy) *ExecutionContext

func (*ExecutionContext) GetParameters

func (c *ExecutionContext) GetParameters() map[string]*benchmark.Parameter

func (*ExecutionContext) IncrementCounter

func (c *ExecutionContext) IncrementCounter(increment int)

func (*ExecutionContext) IsStopped

func (c *ExecutionContext) IsStopped() bool

func (*ExecutionContext) ReportError

func (c *ExecutionContext) ReportError(err error)

func (*ExecutionContext) SendMessage

func (c *ExecutionContext) SendMessage(message string)

func (*ExecutionContext) Stop

func (c *ExecutionContext) Stop()

type ExecutionManager

type ExecutionManager struct {
	Configuration *ConfigurationManager
	Results       *ResultsManager
	// contains filtered or unexported fields
}

func NewExecutionManager

func NewExecutionManager(configuration *ConfigurationManager, results *ResultsManager) *ExecutionManager

func (*ExecutionManager) AddUpdatedListener

func (c *ExecutionManager) AddUpdatedListener(listener *ExecutionCallback)

func (*ExecutionManager) IsRunning

func (c *ExecutionManager) IsRunning() bool

func (*ExecutionManager) NotifyUpdated

func (c *ExecutionManager) NotifyUpdated(state ExecutionState)

func (*ExecutionManager) RemoveUpdatedListener

func (c *ExecutionManager) RemoveUpdatedListener(listener *ExecutionCallback)

func (*ExecutionManager) Run

func (c *ExecutionManager) Run(benchmarks []*BenchmarkInstance, callback func(err error))

func (*ExecutionManager) Start

func (c *ExecutionManager) Start(benchmarks []*BenchmarkInstance)

func (*ExecutionManager) Stop

func (c *ExecutionManager) Stop()

type ExecutionState

type ExecutionState int
const (
	Initial ExecutionState = iota
	Running
	Completed
)

type ExecutionStrategy

type ExecutionStrategy struct {
	IExecutionStrategy
	Configuration *ConfigurationManager
	Results       *ResultsManager
	Execution     IStrategyExecutor

	Benchmarks       []*BenchmarkInstance
	ActiveBenchmarks []*BenchmarkInstance
	Suites           []*BenchmarkSuiteInstance
}

func NewExecutionStrategy

func NewExecutionStrategy(configuration *ConfigurationManager,
	results *ResultsManager, execution IStrategyExecutor, benchmarks []*BenchmarkInstance) *ExecutionStrategy

type ExecutionType

type ExecutionType int
const (
	Proportional ExecutionType = iota
	Sequential
)

type ExecutionTypeParameter

type ExecutionTypeParameter struct {
	*bench.Parameter
	// contains filtered or unexported fields
}

func NewExecutionTypeParameter

func NewExecutionTypeParameter(configuration *ConfigurationManager) *ExecutionTypeParameter

func (*ExecutionTypeParameter) GetValue

func (c *ExecutionTypeParameter) GetValue() string

func (*ExecutionTypeParameter) SetValue

func (c *ExecutionTypeParameter) SetValue(value string)

type IExecutionStrategy

type IExecutionStrategy interface {
	Start() error
	StopExecution() error
	IsStopped() bool
}

type IPerfomedMesurement

type IPerfomedMesurement interface {
	PerformMeasurement() float64
}

type IStrategyExecutor

type IStrategyExecutor interface {
	Stop()
}

type Measurement

type Measurement struct {
	CurrentValue float64
	MinValue     float64
	AverageValue float64
	MaxValue     float64
}

func NewMeasurement

func NewMeasurement(currentValue float64, minValue float64,
	averageValue float64, maxValue float64) *Measurement

type MeasurementType

type MeasurementType int
const (
	Peak MeasurementType = iota
	Nominal
)

type MeasurementTypeParameter

type MeasurementTypeParameter struct {
	*bench.Parameter
	// contains filtered or unexported fields
}

func NewMeasurementTypeParameter

func NewMeasurementTypeParameter(configuration *ConfigurationManager) *MeasurementTypeParameter

func (*MeasurementTypeParameter) GetValue

func (c *MeasurementTypeParameter) GetValue() string

func (*MeasurementTypeParameter) SetValue

func (c *MeasurementTypeParameter) SetValue(value string)

type MemoryUsageMeter

type MemoryUsageMeter struct {
	*BenchmarkMeter
}

func NewMemoryUsageMeter

func NewMemoryUsageMeter() *MemoryUsageMeter

func (*MemoryUsageMeter) PerformMeasurement

func (c *MemoryUsageMeter) PerformMeasurement() float64

type MessageCallback

type MessageCallback func(message string)

type NominalRateParameter

type NominalRateParameter struct {
	*bench.Parameter
	// contains filtered or unexported fields
}

func NewNominalRateParameter

func NewNominalRateParameter(configuration *ConfigurationManager) *NominalRateParameter

func (*NominalRateParameter) GetValue

func (c *NominalRateParameter) GetValue() string

func (*NominalRateParameter) SetValue

func (c *NominalRateParameter) SetValue(value string)

type ParametersManager

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

func NewParametersManager

func NewParametersManager(configuration *ConfigurationManager) *ParametersManager

func (*ParametersManager) AddSuite

func (c *ParametersManager) AddSuite(suite *BenchmarkSuiteInstance)

func (*ParametersManager) All

func (c *ParametersManager) All() []*bench.Parameter

func (*ParametersManager) LoadFromFile

func (c *ParametersManager) LoadFromFile(path string)

func (*ParametersManager) RemoveSuite

func (c *ParametersManager) RemoveSuite(suite *BenchmarkSuiteInstance)

func (*ParametersManager) SaveToFile

func (c *ParametersManager) SaveToFile(path string)

func (*ParametersManager) Set

func (c *ParametersManager) Set(parameters map[string]string)

func (*ParametersManager) SetToDefault

func (c *ParametersManager) SetToDefault()

func (*ParametersManager) UserDefined

func (c *ParametersManager) UserDefined() []*bench.Parameter

type ProportionalExecutionStrategy

type ProportionalExecutionStrategy struct {
	*ExecutionStrategy
	// contains filtered or unexported fields
}

func NewProportionalExecutionStrategy

func NewProportionalExecutionStrategy(configuration *ConfigurationManager, results *ResultsManager,
	execution IStrategyExecutor, benchmarks []*BenchmarkInstance) *ProportionalExecutionStrategy

func (*ProportionalExecutionStrategy) IsStopped

func (c *ProportionalExecutionStrategy) IsStopped() bool

func (*ProportionalExecutionStrategy) Start

func (*ProportionalExecutionStrategy) StopExecution

func (c *ProportionalExecutionStrategy) StopExecution() error

type ReportGenerator

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

func NewReportGenerator

func NewReportGenerator(configuration *ConfigurationManager,
	results *ResultsManager, parameters *ParametersManager,
	benchmarks *BenchmarksManager, environment *EnvironmentManager) *ReportGenerator

func (*ReportGenerator) Generate

func (c *ReportGenerator) Generate() string

func (*ReportGenerator) SaveToFile

func (c *ReportGenerator) SaveToFile(fileName string)

type ResultAggregator

type ResultAggregator struct {
	MaxErrorCount int
	// contains filtered or unexported fields
}

func NewResultAggregator

func NewResultAggregator(results *ResultsManager, benchmarks []*BenchmarkInstance) *ResultAggregator

func (*ResultAggregator) IncrementCounter

func (c *ResultAggregator) IncrementCounter(increment int, now time.Time)

func (*ResultAggregator) ReportError

func (c *ResultAggregator) ReportError(err error)

func (*ResultAggregator) Result

func (c *ResultAggregator) Result() *BenchmarkResult

func (*ResultAggregator) SendMessage

func (c *ResultAggregator) SendMessage(message string)

func (*ResultAggregator) Start

func (c *ResultAggregator) Start()

func (*ResultAggregator) Stop

func (c *ResultAggregator) Stop()

type ResultCallback

type ResultCallback func(result *BenchmarkResult)

type ResultsManager

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

func NewResultsManager

func NewResultsManager() *ResultsManager

func (*ResultsManager) Add

func (c *ResultsManager) Add(result *BenchmarkResult)

func (*ResultsManager) AddErrorListener

func (c *ResultsManager) AddErrorListener(listener *ErrorCallback)

func (*ResultsManager) AddMessageListener

func (c *ResultsManager) AddMessageListener(listener *MessageCallback)

func (*ResultsManager) AddUpdatedListener

func (c *ResultsManager) AddUpdatedListener(listener *ResultCallback)

func (*ResultsManager) All

func (c *ResultsManager) All() []*BenchmarkResult

func (*ResultsManager) Clear

func (c *ResultsManager) Clear()

func (*ResultsManager) NotifyError

func (c *ResultsManager) NotifyError(err error)

func (*ResultsManager) NotifyMessage

func (c *ResultsManager) NotifyMessage(message string)

func (*ResultsManager) NotifyUpdated

func (c *ResultsManager) NotifyUpdated(result *BenchmarkResult)

func (*ResultsManager) RemoveErrorListener

func (c *ResultsManager) RemoveErrorListener(listener *ErrorCallback)

func (*ResultsManager) RemoveMessageListener

func (c *ResultsManager) RemoveMessageListener(listener *MessageCallback)

func (*ResultsManager) RemoveUpdatedListener

func (c *ResultsManager) RemoveUpdatedListener(listener *ResultCallback)

type SequencialExecutionStrategy

type SequencialExecutionStrategy struct {
	*ExecutionStrategy
	// contains filtered or unexported fields
}

func NewSequencialExecutionStrategy

func NewSequencialExecutionStrategy(configuration *ConfigurationManager, results *ResultsManager,
	execution IStrategyExecutor, benchmarks []*BenchmarkInstance) *SequencialExecutionStrategy

func (*SequencialExecutionStrategy) IsStopped

func (c *SequencialExecutionStrategy) IsStopped() bool

func (*SequencialExecutionStrategy) Start

func (*SequencialExecutionStrategy) StopExecution

func (c *SequencialExecutionStrategy) StopExecution() error

type StandardBenchmarkSuite

type StandardBenchmarkSuite struct {
	*benchmark.BenchmarkSuite
	// contains filtered or unexported fields
}

func NewStandardBenchmarkSuite

func NewStandardBenchmarkSuite() *StandardBenchmarkSuite

func (*StandardBenchmarkSuite) GetCpuBenchmark

func (c *StandardBenchmarkSuite) GetCpuBenchmark() *DefaultCpuBenchmark

func (*StandardBenchmarkSuite) GetDiskBenchmark

func (c *StandardBenchmarkSuite) GetDiskBenchmark() *DefaultDiskBenchmark

func (*StandardBenchmarkSuite) GetVideoBenchmark

func (c *StandardBenchmarkSuite) GetVideoBenchmark() *DefaultVideoBenchmark

type SystemInfo

type SystemInfo map[string]string

func NewSystemInfo

func NewSystemInfo() SystemInfo

type TransactionMeter

type TransactionMeter struct {
	*BenchmarkMeter
	// contains filtered or unexported fields
}

func NewTransactionMeter

func NewTransactionMeter() *TransactionMeter

func (*TransactionMeter) IncrementTransactionCounter

func (c *TransactionMeter) IncrementTransactionCounter()

func (*TransactionMeter) PerformMeasurement

func (c *TransactionMeter) PerformMeasurement() float64

func (*TransactionMeter) SetTransactionCounter

func (c *TransactionMeter) SetTransactionCounter(value int)

Jump to

Keyboard shortcuts

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