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 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"` }
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)
Click to show internal directories.
Click to hide internal directories.