inputs

package
v0.0.0-...-a212069 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrNoConfig          = "no GeneratorConfig provided"
	ErrInvalidDataConfig = "invalid config: DataGenerator needs a DataGeneratorConfig"
)

Error messages when using a DataGenerator

Variables

This section is empty.

Functions

This section is empty.

Types

type DataGenerator

type DataGenerator struct {
	// Out is the writer where data should be written. If nil, it will be
	// os.Stdout unless File is specified in the GeneratorConfig passed to
	// Generate.
	Out io.Writer
	// contains filtered or unexported fields
}

DataGenerator is a type of Generator for creating data that will be consumed by a database's write/insert operations. The output is specific to the type of database, but is consumed by TSBS loaders like tsbs_load_timescaledb.

func (*DataGenerator) CreateSimulator

func (g *DataGenerator) CreateSimulator(config *common.DataGeneratorConfig) (common.Simulator, error)

func (*DataGenerator) Generate

func (g *DataGenerator) Generate(config common.GeneratorConfig, target targets.ImplementedTarget) error

type DevopsGeneratorMaker

type DevopsGeneratorMaker interface {
	NewDevops(start, end time.Time, scale int) (queryUtils.QueryGenerator, error)
}

DevopsGeneratorMaker creates a query generator for devops use case

type Generator

type Generator interface {
	Generate(common.GeneratorConfig) error
}

Generator is an interface that defines a type that generates inputs to other TSBS tools. Examples include DataGenerator which creates database data that gets inserted and stored, or QueryGenerator which creates queries that are used to test with.

type IoTGeneratorMaker

type IoTGeneratorMaker interface {
	NewIoT(start, end time.Time, scale int) (queryUtils.QueryGenerator, error)
}

IoTGeneratorMaker creates a quert generator for iot use case

type QueryGenerator

type QueryGenerator struct {
	// Out is the writer where data should be written. If nil, it will be
	// os.Stdout unless File is specified in the GeneratorConfig passed to
	// Generate.
	Out io.Writer
	// DebugOut is where non-generated messages should be written. If nil, it
	// will be os.Stderr.
	DebugOut io.Writer
	// contains filtered or unexported fields
}

QueryGenerator is a type of Generator for creating queries to test against a database. The output is specific to the type of database (due to each using different querying techniques, e.g. SQL or REST), but is consumed by TSBS query runners like tsbs_run_queries_timescaledb.

func NewQueryGenerator

func NewQueryGenerator(useCaseMatrix map[string]map[string]queryUtils.QueryFillerMaker) *QueryGenerator

NewQueryGenerator returns a QueryGenerator that is set up to work with a given useCaseMatrix, which tells it how to generate the given query type for a use case.

func (*QueryGenerator) Generate

func (g *QueryGenerator) Generate(config common.GeneratorConfig) error

Jump to

Keyboard shortcuts

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