config

package
v0.0.0-...-1679dbc Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PDAddr     string
	StatusAddr string

	Log      log.Config `toml:"log" json:"log"`
	Logger   *zap.Logger
	LogProps *log.ZapProperties

	Security configutil.SecurityConfig `toml:"security" json:"security"`

	InitEpochVer      uint64  `toml:"epoch-ver" json:"epoch-ver"`
	StoreCount        int     `toml:"store-count" json:"store-count"`
	HotStoreCount     int     `toml:"hot-store-count" json:"hot-store-count"`
	RegionCount       int     `toml:"region-count" json:"region-count"`
	Replica           int     `toml:"replica" json:"replica"`
	LeaderUpdateRatio float64 `toml:"leader-update-ratio" json:"leader-update-ratio"`
	EpochUpdateRatio  float64 `toml:"epoch-update-ratio" json:"epoch-update-ratio"`
	SpaceUpdateRatio  float64 `toml:"space-update-ratio" json:"space-update-ratio"`
	FlowUpdateRatio   float64 `toml:"flow-update-ratio" json:"flow-update-ratio"`
	ReportRatio       float64 `toml:"report-ratio" json:"report-ratio"`
	Sample            bool    `toml:"sample" json:"sample"`
	Round             int     `toml:"round" json:"round"`
	// contains filtered or unexported fields
}

Config is the heartbeat-bench configuration.

func NewConfig

func NewConfig() *Config

NewConfig return a set of settings.

func (*Config) Adjust

func (c *Config) Adjust(meta *toml.MetaData)

Adjust is used to adjust configurations

func (*Config) Clone

func (c *Config) Clone() *Config

Clone creates a copy of current config.

func (*Config) Parse

func (c *Config) Parse(arguments []string) error

Parse parses flag definitions from the argument list.

func (*Config) Validate

func (c *Config) Validate() error

Validate is used to validate configurations

type Options

type Options struct {
	HotStoreCount atomic.Value
	ReportRatio   atomic.Value

	LeaderUpdateRatio atomic.Value
	EpochUpdateRatio  atomic.Value
	SpaceUpdateRatio  atomic.Value
	FlowUpdateRatio   atomic.Value
}

Options is the option of the heartbeat-bench.

func NewOptions

func NewOptions(cfg *Config) *Options

NewOptions creates a new option.

func (*Options) GetEpochUpdateRatio

func (o *Options) GetEpochUpdateRatio() float64

GetEpochUpdateRatio returns the epoch update ratio.

func (*Options) GetFlowUpdateRatio

func (o *Options) GetFlowUpdateRatio() float64

GetFlowUpdateRatio returns the flow update ratio.

func (*Options) GetHotStoreCount

func (o *Options) GetHotStoreCount() int

GetHotStoreCount returns the hot store count.

func (*Options) GetLeaderUpdateRatio

func (o *Options) GetLeaderUpdateRatio() float64

GetLeaderUpdateRatio returns the leader update ratio.

func (*Options) GetReportRatio

func (o *Options) GetReportRatio() float64

GetReportRatio returns the report ratio.

func (*Options) GetSpaceUpdateRatio

func (o *Options) GetSpaceUpdateRatio() float64

GetSpaceUpdateRatio returns the space update ratio.

func (*Options) SetOptions

func (o *Options) SetOptions(cfg *Config)

SetOptions sets the option.

Jump to

Keyboard shortcuts

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