Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UserAgent = fmt.Sprintf("Benchtool/%s", version.Version)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ID string `yaml:"id"`
InstanceName string `yaml:"instance_name"`
WorkloadFilePath string `yaml:"workload_file_path"`
RingCheck RingCheckConfig `yaml:"ring_check"`
Write WriteBenchConfig `yaml:"writes"`
Query QueryConfig `yaml:"query"`
}
func (*Config) RegisterFlags ¶
type QueryConfig ¶
type QueryConfig struct {
Enabled bool `yaml:"enabled"`
Endpoint string `yaml:"endpoint"`
BasicAuthUsername string `yaml:"basic_auth_username"`
BasicAuthPasword string `yaml:"basic_auth_password"`
}
func (*QueryConfig) RegisterFlags ¶
func (cfg *QueryConfig) RegisterFlags(f *flag.FlagSet)
type QueryDesc ¶
type QueryDesc struct {
NumQueries int `yaml:"num_queries"`
ExprTemplate string `yaml:"expr_template"`
RequiredSeriesType SeriesType `yaml:"series_type"`
Interval time.Duration `yaml:"interval"`
TimeRange time.Duration `yaml:"time_range,omitempty"`
Regex bool `yaml:"regex"`
InjectExactSerierMatcher bool `yaml:"inject_exact_series_matcher"`
}
type RingCheckConfig ¶
type RingCheckConfig struct {
Enabled bool `yaml:"enabled"`
MemberlistKV memberlist.KVConfig `yaml:"memberlist"`
RingConfig ring.Config `yaml:"ring"`
CheckInterval time.Duration `yaml:"check_interval"`
}
func (*RingCheckConfig) RegisterFlagsWithPrefix ¶
func (cfg *RingCheckConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)
type RingChecker ¶
type RingChecker struct {
Ring *ring.Ring
MemberlistKV *memberlist.KVInitService
// contains filtered or unexported fields
}
func NewRingChecker ¶
func NewRingChecker(id string, instanceName string, cfg RingCheckConfig, workload *WriteWorkload, logger log.Logger) (*RingChecker, error)
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func NewBenchRunner ¶
func NewBenchRunner(cfg Config, logger log.Logger, reg prometheus.Registerer) (*Runner, error)
type SeriesDesc ¶
type SeriesDesc struct {
Name string `yaml:"name"`
Type SeriesType `yaml:"type"`
StaticLabels map[string]string `yaml:"static_labels"`
Labels []LabelDesc `yaml:"labels"`
}
type SeriesType ¶
type SeriesType string
const ( GaugeZero SeriesType = "gauge-zero" GaugeRandom SeriesType = "gauge-random" CounterOne SeriesType = "counter-one" CounterRandom SeriesType = "counter-random" )
type Timeseries ¶ added in v0.10.2
type Timeseries struct {
// contains filtered or unexported fields
}
func SeriesDescToSeries ¶ added in v0.10.2
func SeriesDescToSeries(seriesDescs []SeriesDesc) ([]*Timeseries, map[SeriesType]int)
type WorkloadDesc ¶
type WorkloadDesc struct {
Replicas int `yaml:"replicas"`
Series []SeriesDesc `yaml:"series"`
QueryDesc []QueryDesc `yaml:"queries"`
Write WriteDesc `yaml:"write_options"`
}
type WriteBenchConfig ¶
type WriteBenchConfig struct {
Enabled bool `yaml:"enabled"`
Endpoint string `yaml:"endpoint"`
BasicAuthUsername string `yaml:"basic_auth_username"`
BasicAuthPasword string `yaml:"basic_auth_password"`
ProxyURL string `yaml:"proxy_url"`
}
func (*WriteBenchConfig) RegisterFlags ¶
func (cfg *WriteBenchConfig) RegisterFlags(f *flag.FlagSet)
type WriteBenchmarkRunner ¶
type WriteBenchmarkRunner struct {
// contains filtered or unexported fields
}
func NewWriteBenchmarkRunner ¶
func NewWriteBenchmarkRunner(id string, tenantName string, cfg WriteBenchConfig, workload *WriteWorkload, logger log.Logger, reg prometheus.Registerer) (*WriteBenchmarkRunner, error)
type WriteWorkload ¶ added in v0.10.2
type WriteWorkload struct {
Replicas int
Series []*Timeseries
TotalSeries int
TotalSeriesTypeMap map[SeriesType]int
// contains filtered or unexported fields
}
func (*WriteWorkload) GenerateTimeSeries ¶ added in v0.10.2
func (w *WriteWorkload) GenerateTimeSeries(id string, t time.Time) []prompb.TimeSeries
Click to show internal directories.
Click to hide internal directories.