Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Simulation ¶
func Simulation()
Simulation enable go channel transportation to simulate distributed environment
Types ¶
type Bconfig ¶
type Bconfig struct { T int // total number of running time in seconds N int // total number of requests K int // key sapce Throttle int // requests per second throttle, unused if 0 Concurrency int // number of simulated clients Distribution string // distribution // conflict distribution Conflicts int // percentage of conflicting keys Min int // min key // normal distribution Mu float64 // mu of normal distribution Sigma float64 // sigma of normal distribution Move bool // moving average (mu) of normal distribution Speed int // moving speed in milliseconds intervals per key }
Bconfig holds all benchmark configuration
type Config ¶
type Config struct { Addrs map[identity.NodeID]string `json:"address"` // address for node communication HTTPAddrs map[identity.NodeID]string `json:"http_address"` // address for client server communication Policy string `json:"policy"` // leader change policy {consecutive, majority} Threshold float64 `json:"threshold"` // threshold for policy in WPaxos {n consecutive or time interval in ms} Thrifty bool `json:"thrifty"` // only send messages to a quorum BufferSize int `json:"buffer_size"` // buffer size for maps ChanBufferSize int `json:"chan_buffer_size"` // buffer size for channels MultiVersion bool `json:"multiversion"` // create multi-version database Timeout int `json:"timeout"` ByzNo int `json:"byzNo"` BSize int `json:"bsize"` Fixed bool `json:"fixed"` Benchmark Bconfig `json:"benchmark"` // benchmark configuration Delta int `json:"delta"` // timeout, seconds Pprof bool `json:"pprof"` MaxRound int `json:"maxRound"` Strategy string `json:"strategy"` PayloadSize int `json:"payload_size"` Master identity.NodeID `json:"master"` Delay int `json:"delay"` // transmission delay in ms DErr int `json:"derr"` // the err taken into delays MemSize int `json:"memsize"` Slow int `json:"slow"` Crash int `json:"crash"` // contains filtered or unexported fields }
Config contains every system configuration
var Configuration Config
Config is global configuration singleton generated by init() func below
func MakeDefaultConfig ¶
func MakeDefaultConfig() Config
MakeDefaultConfig returns Config object with few default values only used by init() and master
func (Config) GetHashScheme ¶
GetHash returns the hashing scheme of the configuration
func (Config) GetSignatureScheme ¶
Click to show internal directories.
Click to hide internal directories.