Merge pull request #6205 from heyitsanthony/ft-large-writes
functional-tester: put large keysrelease-3.1
commit
a5022c1cba
|
@ -39,6 +39,7 @@ type cluster struct {
|
||||||
|
|
||||||
datadir string
|
datadir string
|
||||||
stressQPS int
|
stressQPS int
|
||||||
|
stressKeyLargeSize int
|
||||||
stressKeySize int
|
stressKeySize int
|
||||||
stressKeySuffixRange int
|
stressKeySuffixRange int
|
||||||
|
|
||||||
|
@ -111,6 +112,7 @@ func (c *cluster) bootstrap(agentEndpoints []string) error {
|
||||||
} else {
|
} else {
|
||||||
c.Stressers[i] = &stresser{
|
c.Stressers[i] = &stresser{
|
||||||
Endpoint: m.grpcAddr(),
|
Endpoint: m.grpcAddr(),
|
||||||
|
keyLargeSize: c.stressKeyLargeSize,
|
||||||
keySize: c.stressKeySize,
|
keySize: c.stressKeySize,
|
||||||
keySuffixRange: c.stressKeySuffixRange,
|
keySuffixRange: c.stressKeySuffixRange,
|
||||||
N: stressN,
|
N: stressN,
|
||||||
|
|
|
@ -29,7 +29,8 @@ var plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcd-tester")
|
||||||
func main() {
|
func main() {
|
||||||
endpointStr := flag.String("agent-endpoints", "localhost:9027", "HTTP RPC endpoints of agents. Do not specify the schema.")
|
endpointStr := flag.String("agent-endpoints", "localhost:9027", "HTTP RPC endpoints of agents. Do not specify the schema.")
|
||||||
datadir := flag.String("data-dir", "agent.etcd", "etcd data directory location on agent machine.")
|
datadir := flag.String("data-dir", "agent.etcd", "etcd data directory location on agent machine.")
|
||||||
stressKeySize := flag.Uint("stress-key-size", 100, "the size of each key written into etcd.")
|
stressKeyLargeSize := flag.Uint("stress-key-large-size", 32*1024+1, "the size of each large key written into etcd.")
|
||||||
|
stressKeySize := flag.Uint("stress-key-size", 100, "the size of each small key written into etcd.")
|
||||||
stressKeySuffixRange := flag.Uint("stress-key-count", 250000, "the count of key range written into etcd.")
|
stressKeySuffixRange := flag.Uint("stress-key-count", 250000, "the count of key range written into etcd.")
|
||||||
limit := flag.Int("limit", -1, "the limit of rounds to run failure set (-1 to run without limits).")
|
limit := flag.Int("limit", -1, "the limit of rounds to run failure set (-1 to run without limits).")
|
||||||
stressQPS := flag.Int("stress-qps", 10000, "maximum number of stresser requests per second.")
|
stressQPS := flag.Int("stress-qps", 10000, "maximum number of stresser requests per second.")
|
||||||
|
@ -42,6 +43,7 @@ func main() {
|
||||||
v2Only: *isV2Only,
|
v2Only: *isV2Only,
|
||||||
datadir: *datadir,
|
datadir: *datadir,
|
||||||
stressQPS: *stressQPS,
|
stressQPS: *stressQPS,
|
||||||
|
stressKeyLargeSize: int(*stressKeyLargeSize),
|
||||||
stressKeySize: int(*stressKeySize),
|
stressKeySize: int(*stressKeySize),
|
||||||
stressKeySuffixRange: int(*stressKeySuffixRange),
|
stressKeySuffixRange: int(*stressKeySuffixRange),
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,6 +135,7 @@ type Stresser interface {
|
||||||
type stresser struct {
|
type stresser struct {
|
||||||
Endpoint string
|
Endpoint string
|
||||||
|
|
||||||
|
keyLargeSize int
|
||||||
keySize int
|
keySize int
|
||||||
keySuffixRange int
|
keySuffixRange int
|
||||||
|
|
||||||
|
@ -179,6 +180,10 @@ func (s *stresser) Stress() error {
|
||||||
|
|
||||||
var stressEntries = []stressEntry{
|
var stressEntries = []stressEntry{
|
||||||
{weight: 0.7, f: newStressPut(kvc, s.keySuffixRange, s.keySize)},
|
{weight: 0.7, f: newStressPut(kvc, s.keySuffixRange, s.keySize)},
|
||||||
|
{
|
||||||
|
weight: 0.7 * float32(s.keySize) / float32(s.keyLargeSize),
|
||||||
|
f: newStressPut(kvc, s.keySuffixRange, s.keyLargeSize),
|
||||||
|
},
|
||||||
{weight: 0.07, f: newStressRange(kvc, s.keySuffixRange)},
|
{weight: 0.07, f: newStressRange(kvc, s.keySuffixRange)},
|
||||||
{weight: 0.07, f: newStressRangeInterval(kvc, s.keySuffixRange)},
|
{weight: 0.07, f: newStressRangeInterval(kvc, s.keySuffixRange)},
|
||||||
{weight: 0.07, f: newStressDelete(kvc, s.keySuffixRange)},
|
{weight: 0.07, f: newStressDelete(kvc, s.keySuffixRange)},
|
||||||
|
|
Loading…
Reference in New Issue