Documentation ¶
Index ¶
Constants ¶
const (
DefaultChannelCapacityFlagVal = 0
)
Variables ¶
This section is empty.
Functions ¶
func GetBufferedReader ¶
GetBufferedReader returns the buffered Reader that should be used by the file loader if no file name is specified a buffer for STDIN is returned
func GetBufferedWriter ¶
GetBufferedWriter returns the buffered Writer that should be used by the file writer if no file name is specified a buffer for STDIN is returned
Types ¶
type BenchmarkRunner ¶
func GetBenchmarkRunner ¶
func GetBenchmarkRunner(c BenchmarkRunnerConfig) BenchmarkRunner
GetBenchmarkRunnerWithBatchSize returns the singleton CommonBenchmarkRunner for use in a benchmark program with specified batch size.
type BenchmarkRunnerConfig ¶
type BenchmarkRunnerConfig struct { DBName string `yaml:"db-name" mapstructure:"db-name"` BatchSize uint `yaml:"batch-size" mapstructure:"batch-size"` Workers uint `yaml:"workers" mapstructure:"workers"` Limit uint64 `yaml:"limit" mapstructure:"limit"` DoLoad bool `yaml:"do-load" mapstructure:"do-load"` DoCreateDB bool `yaml:"do-create-db" mapstructure:"do-create-db"` DoAbortOnExist bool `yaml:"do-abort-on-exist" mapstructure:"do-abort-on-exist"` ReportingPeriod time.Duration `yaml:"reporting-period" mapstructure:"reporting-period"` HashWorkers bool `yaml:"hash-workers" mapstructure:"hash-workers"` NoFlowControl bool `yaml:"no-flow-control" mapstructure:"no-flow-control"` ChannelCapacity uint `yaml:"channel-capacity" mapstructure:"channel-capacity"` InsertIntervals string `yaml:"insert-intervals" mapstructure:"insert-intervals"` LatenciesFile string `yaml:"latencies-file" mapstructure:"latencies-file"` // deprecated, should not be used in other places other than tsbs_load_xx commands FileName string `yaml:"file" mapstructure:"file"` Seed int64 `yaml:"seed" mapstructure:"seed"` }
BenchmarkRunnerConfig contains all the configuration information required for running BenchmarkRunner.
func (BenchmarkRunnerConfig) AddToFlagSet ¶
func (c BenchmarkRunnerConfig) AddToFlagSet(fs *pflag.FlagSet)
AddToFlagSet adds command line flags needed by the BenchmarkRunnerConfig to the flag set.
type CommonBenchmarkRunner ¶
type CommonBenchmarkRunner struct { BenchmarkRunnerConfig // contains filtered or unexported fields }
CommonBenchmarkRunner is responsible for initializing and storing common flags across all database systems and ultimately running a supplied Benchmark
func (*CommonBenchmarkRunner) DatabaseName ¶
func (l *CommonBenchmarkRunner) DatabaseName() string
DatabaseName returns the value of the --db-name flag (name of the database to store data)
func (*CommonBenchmarkRunner) RunBenchmark ¶
func (l *CommonBenchmarkRunner) RunBenchmark(b targets.Benchmark)
RunBenchmark takes in a Benchmark b and uses it to run the load benchmark
type Stat ¶
type Stat struct {
// contains filtered or unexported fields
}
Stat represents one statistical measurement, typically used to store the latency of a query (or part of query).
func GetPartialStat ¶
func GetPartialStat() *Stat
GetPartialStat returns a partial Stat for use from a pool