common

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const TsdbBenchIngestConfig = "TSDB_BENCH_INGEST_CONFIG"

Variables

This section is empty.

Functions

func MakeNamesRange

func MakeNamesRange(prefix string, count, minIndex, maxIndex int) ([]string, error)

func MakeRandomFloat64

func MakeRandomFloat64() float64

func MakeSampleTemplates

func MakeSampleTemplates(model map[string]map[string][]string) []string

func MakeSamplesModel

func MakeSamplesModel(namesCount, namesDiversity, labelsCount, labelDiversity, labelValueCount,
	labelValueDiversity int) map[string]map[string][]string

Types

type BenchmarkIngestConfig

type BenchmarkIngestConfig struct {
	Verbose              bool   `json:"Verbose,omitempty" yaml:"Verbose"`
	StartTimeOffset      string `json:"StartTimeOffset,omitempty" yaml:"StartTimeOffset"`
	SampleStepSize       int    `json:"SampleStepSize,omitempty" yaml:"SampleStepSize"`
	NamesCount           int    `json:"NamesCount,omitempty" yaml:"NamesCount"`
	NamesDiversity       int    `json:"NamesDiversity,omitempty" yaml:"NamesDiversity"`
	LabelsCount          int    `json:"LabelsCount,omitempty" yaml:"LabelsCount"`
	LabelsDiversity      int    `json:"LabelsDiversity,omitempty" yaml:"LabelsDiversity"`
	LabelValuesCount     int    `json:"LabelValuesCount,omitempty" yaml:"LabelValuesCount"`
	LabelsValueDiversity int    `json:"LabelsValueDiversity,omitempty" yaml:"LabelsValueDiversity"`
	FlushFrequency       int    `json:"FlushFrequency,omitempty" yaml:"FlushFrequency"`
	AppendOneByOne       bool   `json:"AppendOneByOne,omitempty" yaml:"AppendOneByOne"`
}

func LoadBenchmarkIngestConfigs

func LoadBenchmarkIngestConfigs() (*BenchmarkIngestConfig, *config.V3ioConfig, error)

type Sample

type Sample struct {
	Lset  utils.Labels
	Time  string
	Value float64
}

func JsonTemplate2Sample

func JsonTemplate2Sample(sampleJsonTemplate string, time int64, value float64) (*Sample, error)

Jump to

Keyboard shortcuts

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